e1000g_main.c revision c124a83e09115de88ecccd4f689983f42a1d53bd
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * This file is provided under a CDDLv1 license. When using or
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * redistributing this file, you may do so under this license.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * In redistributing this file this license must be included
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * and no other modification of this header file is permitted.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * CDDL LICENSE SUMMARY
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Copyright(c) 1999 - 2009 Intel Corporation. All rights reserved.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * The contents of this file are subject to the terms of Version
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * 1.0 of the Common Development and Distribution License (the "License").
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * You should have received a copy of the License with this software.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * You can obtain a copy of the License at
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * See the License for the specific language governing permissions
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * and limitations under the License.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Copyright (c) 2015, Joyent, Inc.
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * **********************************************************************
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Module Name: *
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Abstract: *
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * This file contains the interface routines for the solaris OS. *
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * It has all DDI entry point routines and GLD entry point routines. *
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * This file also contains routines that take care of initialization *
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * uninit routine and interrupt routine. *
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * **********************************************************************
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic char ident[] = "Intel PRO/1000 Ethernet";
06db247c678f0e3956535e8a6dec31d6c2108827raghuram/* LINTED E_STATIC_UNUSED */
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic char e1000g_version[] = "Driver Ver. 5.3.24";
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * Proto types for DDI entry points
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_attach(dev_info_t *, ddi_attach_cmd_t);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_detach(dev_info_t *, ddi_detach_cmd_t);
06db247c678f0e3956535e8a6dec31d6c2108827raghuram * init and intr routines prototype
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_intr_work(struct e1000g *, uint32_t);
06db247c678f0e3956535e8a6dec31d6c2108827raghuram#pragma inline(e1000g_intr_work)
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_start(struct e1000g *, boolean_t);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_stop(struct e1000g *, boolean_t);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_m_start(void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_m_stop(void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic boolean_t e1000g_m_getcapab(void *, mac_capab_t, void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_m_multicst(void *, boolean_t, const uint8_t *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_m_ioctl(void *, queue_t *, mblk_t *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_m_setprop(void *, const char *, mac_prop_id_t,
06db247c678f0e3956535e8a6dec31d6c2108827raghuram uint_t, const void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_m_getprop(void *, const char *, mac_prop_id_t,
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_m_propinfo(void *, const char *, mac_prop_id_t,
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_set_priv_prop(struct e1000g *, const char *, uint_t,
06db247c678f0e3956535e8a6dec31d6c2108827raghuram const void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_get_priv_prop(struct e1000g *, const char *, uint_t, void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_identify_hardware(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_set_driver_params(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_unicst_set(struct e1000g *, const uint8_t *, int);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_release_multicast(struct e1000g *);
f0ca1d9a12d54d304791bc74525e2010ca924726sb * Local routines
f0ca1d9a12d54d304791bc74525e2010ca924726sbstatic void e1000g_link_timer(void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_local_timer(void *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic boolean_t e1000g_link_check(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic boolean_t e1000g_stall_check(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic boolean_t e1000g_get_prop(struct e1000g *, char *, int, int, int,
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_force_speed_duplex(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_get_max_frame_size(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_unattach(dev_info_t *, struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_get_bar_info(dev_info_t *, int, bar_info_t *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_ioc_peek_reg(struct e1000g *, e1000g_peekpoke_t *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_ioc_poke_reg(struct e1000g *, e1000g_peekpoke_t *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_ioc_peek_mem(struct e1000g *, e1000g_peekpoke_t *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_ioc_poke_mem(struct e1000g *, e1000g_peekpoke_t *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic enum ioc_reply e1000g_pp_ioctl(struct e1000g *,
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic enum ioc_reply e1000g_loopback_ioctl(struct e1000g *,
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic boolean_t e1000g_check_loopback_support(struct e1000_hw *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic boolean_t e1000g_set_loopback_mode(struct e1000g *, uint32_t);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_set_internal_loopback(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_set_external_loopback_1000(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_set_external_loopback_100(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_set_external_loopback_10(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic boolean_t e1000g_find_mac_address(struct e1000g *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic int e1000g_fm_error_cb(dev_info_t *dip, ddi_fm_error_t *err,
06db247c678f0e3956535e8a6dec31d6c2108827raghuram const void *impl_data);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_get_driver_control(struct e1000_hw *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_release_driver_control(struct e1000_hw *);
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic void e1000g_restore_promisc(struct e1000g *Adapter);
f0ca1d9a12d54d304791bc74525e2010ca924726sb "_tx_bcopy_threshold",
f0ca1d9a12d54d304791bc74525e2010ca924726sb "_tx_interrupt_enable",
06db247c678f0e3956535e8a6dec31d6c2108827raghuram "_tx_intr_delay",
f0ca1d9a12d54d304791bc74525e2010ca924726sb "_tx_intr_abs_delay",
f0ca1d9a12d54d304791bc74525e2010ca924726sb "_rx_bcopy_threshold",
f0ca1d9a12d54d304791bc74525e2010ca924726sb "_max_num_rcv_packets",
f0ca1d9a12d54d304791bc74525e2010ca924726sb "_rx_intr_delay",
06db247c678f0e3956535e8a6dec31d6c2108827raghuram "_rx_intr_abs_delay",
06db247c678f0e3956535e8a6dec31d6c2108827raghuram "_intr_throttling_rate",
06db247c678f0e3956535e8a6dec31d6c2108827raghuram "_intr_adaptive",
06db247c678f0e3956535e8a6dec31d6c2108827raghuram "_adv_pause_cap",
06db247c678f0e3956535e8a6dec31d6c2108827raghuram "_adv_asym_pause_cap",
f0ca1d9a12d54d304791bc74525e2010ca924726sb 0, /* devo_refcnt */
06db247c678f0e3956535e8a6dec31d6c2108827raghuram &mod_driverops, /* Type of module. This one is a driver */
06db247c678f0e3956535e8a6dec31d6c2108827raghuram ident, /* Discription string */
06db247c678f0e3956535e8a6dec31d6c2108827raghuram/* Access attributes for register mapping */
06db247c678f0e3956535e8a6dec31d6c2108827raghuramstatic ddi_device_acc_attr_t e1000g_regs_acc_attr = {
06db247c678f0e3956535e8a6dec31d6c2108827raghuram (MC_IOCTL | MC_GETCAPAB | MC_SETPROP | MC_GETPROP | MC_PROPINFO)
NULL,
NULL,
#ifdef __sparc
_init(void)
int status;
return (status);
_fini(void)
int status;
if (e1000g_mblks_pending != 0)
return (EBUSY);
if (e1000g_force_detach) {
sizeof (struct dev_info));
sizeof (private_devi_list_t));
return (status);
int instance;
switch (cmd) {
return (DDI_FAILURE);
case DDI_RESUME:
case DDI_ATTACH:
Adapter =
goto attach_fail;
goto attach_fail;
goto attach_fail;
goto attach_fail;
goto attach_fail;
goto attach_fail;
goto attach_fail;
goto attach_fail;
goto attach_fail;
goto attach_fail;
if (e1000g_force_detach) {
sizeof (struct dev_info));
return (DDI_SUCCESS);
return (DDI_FAILURE);
int err;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
DDI_SUCCESS) {
return (DDI_FAILURE);
goto regs_map_fail;
case e1000_ich8lan:
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_pchlan:
case e1000_pch2lan:
case e1000_pch_lpt:
goto regs_map_fail;
goto regs_map_fail;
case e1000_82544:
case e1000_82540:
case e1000_82545:
case e1000_82546:
case e1000_82541:
case e1000_82541_rev_2:
!= DDI_SUCCESS)
if (rnumber < 0) {
goto regs_map_fail;
goto regs_map_fail;
goto regs_map_fail;
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
#ifdef __sparc
return (DDI_SUCCESS);
case e1000_ich8lan:
case e1000_82573:
case e1000_82583:
case e1000_ich9lan:
case e1000_pchlan:
case e1000_pch2lan:
case e1000_pch_lpt:
case e1000_82571:
case e1000_82572:
case e1000_82574:
case e1000_80003es2lan:
case e1000_ich10lan:
#ifdef __sparc
#ifdef __sparc
if (iommu_pagesize != 0) {
* aligned...so all wiseman boards to have 256 byte aligned
switch (cmd) {
return (DDI_FAILURE);
case DDI_SUSPEND:
case DDI_DETACH:
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
sizeof (struct dev_info));
sizeof (private_devi_list_t));
int result;
return (DDI_FAILURE);
return (DDI_FAILURE);
switch (type) {
case PCI_ADDR_CONFIG:
case PCI_ADDR_IO:
case PCI_ADDR_MEM32:
case PCI_ADDR_MEM64:
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_SUCCESS);
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_SUCCESS);
int result;
goto init_fail;
goto init_fail;
result = 0;
#ifdef __sparc
if (!result) {
goto init_fail;
goto init_fail;
goto init_fail;
* Configure/Initialize hardware
goto init_fail;
goto init_fail;
goto init_fail;
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
static boolean_t
case e1000_media_type_copper:
E1000_STATUS_LU)) {
case e1000_media_type_fiber:
return (link_up);
case LB_GET_INFO_SIZE:
case LB_GET_INFO:
case LB_GET_MODE:
case LB_SET_MODE:
#ifdef E1000G_DEBUG
case E1000G_IOC_REG_PEEK:
case E1000G_IOC_REG_POKE:
case E1000G_IOC_CHIP_RESET:
switch (status) {
case IOC_INVAL:
case IOC_DONE:
case IOC_ACK:
case IOC_REPLY:
int e1000g_poll_mode = 0;
return (NULL);
return (mp);
return (ECANCELED);
return (ENOTACTIVE);
if (global) {
goto start_fail;
goto start_fail;
goto start_fail;
goto start_fail;
return (DDI_SUCCESS);
if (global) {
return (DDI_FAILURE);
int result;
if (global) {
packet_count = 0;
packet_count++;
if (packet_count > 0) {
static boolean_t
for (i = 0; i < TX_DRAIN_TIME; i++) {
if (done)
return (done);
static boolean_t
for (i = 0; i < RX_DRAIN_TIME; i++) {
if (done)
return (done);
static boolean_t
return (B_TRUE);
return (B_FALSE);
return (B_TRUE);
return (B_FALSE);
return (B_TRUE);
static uint_t
return (DDI_INTR_CLAIMED);
return (DDI_INTR_CLAIMED);
return (DDI_INTR_UNCLAIMED);
static uint_t
return (DDI_INTR_CLAIMED);
if (icr) {
return (DDI_INTR_CLAIMED);
return (DDI_INTR_UNCLAIMED);
if (link_changed) {
if (tid != 0)
int slot;
if (locked == 0)
rar += 0;
int slot)
if (slot == 0) {
return (EIO);
int res = 0;
goto done;
goto done;
sizeof (struct ether_addr);
sizeof (struct ether_addr);
goto done;
done:
return (res);
ETHERADDRL) == 0) {
sizeof (struct ether_addr);
sizeof (struct ether_addr);
return (EIO);
int result;
goto done;
done:
return (result);
return (ECANCELED);
if (on)
rctl |=
return (EIO);
int slot;
return (slot);
return (ECANCELED);
return (ENOSPC);
if (err == 0)
return (err);
return (ECANCELED);
return (EINVAL);
if (err == 0)
return (err);
static boolean_t
switch (cap) {
case MAC_CAPAB_HCKSUM: {
return (B_FALSE);
case MAC_CAPAB_LSO: {
return (B_FALSE);
case MAC_CAPAB_RINGS: {
return (B_FALSE);
return (B_FALSE);
return (B_TRUE);
static boolean_t
switch (pr_num) {
case MAC_PROP_EN_1000FDX_CAP:
case MAC_PROP_EN_1000HDX_CAP:
case MAC_PROP_EN_100FDX_CAP:
case MAC_PROP_EN_100HDX_CAP:
case MAC_PROP_EN_10FDX_CAP:
case MAC_PROP_EN_10HDX_CAP:
case MAC_PROP_AUTONEG:
case MAC_PROP_FLOWCTRL:
return (B_TRUE);
return (B_FALSE);
int err = 0;
return (ECANCELED);
return (EBUSY);
switch (pr_num) {
case MAC_PROP_EN_1000FDX_CAP:
goto reset;
case MAC_PROP_EN_100FDX_CAP:
goto reset;
case MAC_PROP_EN_100HDX_CAP:
goto reset;
case MAC_PROP_EN_10FDX_CAP:
goto reset;
case MAC_PROP_EN_10HDX_CAP:
goto reset;
case MAC_PROP_AUTONEG:
goto reset;
case MAC_PROP_FLOWCTRL:
switch (flowctrl) {
case LINK_FLOWCTRL_NONE:
case LINK_FLOWCTRL_RX:
case LINK_FLOWCTRL_TX:
case LINK_FLOWCTRL_BI:
if (err == 0) {
case MAC_PROP_ADV_1000FDX_CAP:
case MAC_PROP_ADV_1000HDX_CAP:
case MAC_PROP_ADV_100FDX_CAP:
case MAC_PROP_ADV_100HDX_CAP:
case MAC_PROP_ADV_10FDX_CAP:
case MAC_PROP_ADV_10HDX_CAP:
case MAC_PROP_EN_1000HDX_CAP:
case MAC_PROP_STATUS:
case MAC_PROP_SPEED:
case MAC_PROP_DUPLEX:
case MAC_PROP_MTU:
err = 0;
if (err == 0) {
(FRAME_SIZE_UPTO_4K)) {
case MAC_PROP_PRIVATE:
return (err);
int err = 0;
switch (pr_num) {
case MAC_PROP_DUPLEX:
sizeof (link_duplex_t));
case MAC_PROP_SPEED:
case MAC_PROP_AUTONEG:
case MAC_PROP_FLOWCTRL:
case e1000_fc_none:
case e1000_fc_rx_pause:
case e1000_fc_tx_pause:
case e1000_fc_full:
case MAC_PROP_ADV_1000FDX_CAP:
case MAC_PROP_EN_1000FDX_CAP:
case MAC_PROP_ADV_1000HDX_CAP:
case MAC_PROP_EN_1000HDX_CAP:
case MAC_PROP_ADV_100FDX_CAP:
case MAC_PROP_EN_100FDX_CAP:
case MAC_PROP_ADV_100HDX_CAP:
case MAC_PROP_EN_100HDX_CAP:
case MAC_PROP_ADV_10FDX_CAP:
case MAC_PROP_EN_10FDX_CAP:
case MAC_PROP_ADV_10HDX_CAP:
case MAC_PROP_EN_10HDX_CAP:
case MAC_PROP_ADV_100T4_CAP:
case MAC_PROP_EN_100T4_CAP:
case MAC_PROP_PRIVATE:
return (err);
switch (pr_num) {
case MAC_PROP_DUPLEX:
case MAC_PROP_SPEED:
case MAC_PROP_ADV_1000FDX_CAP:
case MAC_PROP_ADV_1000HDX_CAP:
case MAC_PROP_ADV_100FDX_CAP:
case MAC_PROP_ADV_100HDX_CAP:
case MAC_PROP_ADV_10FDX_CAP:
case MAC_PROP_ADV_10HDX_CAP:
case MAC_PROP_ADV_100T4_CAP:
case MAC_PROP_EN_100T4_CAP:
case MAC_PROP_EN_1000FDX_CAP:
case MAC_PROP_EN_100FDX_CAP:
case MAC_PROP_EN_100HDX_CAP:
case MAC_PROP_EN_10FDX_CAP:
case MAC_PROP_EN_10HDX_CAP:
case MAC_PROP_EN_1000HDX_CAP:
case MAC_PROP_AUTONEG:
case MAC_PROP_FLOWCTRL:
case MAC_PROP_MTU: {
e1000_phy_ife))) {
case MAC_PROP_PRIVATE: {
int value;
int err = 0;
long result;
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (err);
return (ENOTSUP);
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;
err = 0;
goto done;
err = 0;
goto done;
err = 0;
goto done;
done:
if (err == 0) {
return (err);
* e1000g_get_conf - get configurations set in e1000g.conf
* file e1000g.conf.
int propval;
* get each configurable property from e1000g.conf
&propval);
case e1000_82540:
case e1000_82544:
case e1000_82545:
case e1000_82545_rev_3:
case e1000_82546:
case e1000_82546_rev_3:
case e1000_82571:
case e1000_82572:
case e1000_82573:
case e1000_80003es2lan:
case e1000_82546:
case e1000_82546_rev_3:
case e1000_82571:
case e1000_82572:
case e1000_82573:
case e1000_80003es2lan:
&propval);
* file e1000g.conf.
static boolean_t
"Not Enough %s values found in e1000g.conf"
"Too High %s value in e1000g.conf - set to %d\n",
"Too Low %s value in e1000g.conf - set to %d\n",
return (ret);
static boolean_t
return (link_changed);
goto out;
if (invalid) {
out:
if (link_changed) {
* e1000g_force_speed_duplex - read forced speed/duplex out of e1000g.conf
* and also for 1000 Mbps speeds from the e1000g.conf file
int forced;
int propval;
switch (forced) {
case GDIAG_10_HALF:
case GDIAG_10_FULL:
case GDIAG_100_HALF:
case GDIAG_100_FULL:
case GDIAG_1000_FULL:
* e1000g_get_max_frame_size - get jumbo frame setting from e1000g.conf
* This function reads MaxFrameSize from e1000g.conf
int max_frame;
&max_frame);
switch (max_frame) {
static uint32_t
return (maxframe);
#pragma inline(arm_watchdog_timer)
if (tid != 0)
if (tid != 0)
if (tid != 0)
if (tid != 0)
phy_ctrl |=
static boolean_t
return (B_FALSE);
return (B_TRUE);
static boolean_t
return (B_FALSE);
return (B_TRUE);
return (B_FALSE);
#ifdef E1000G_DEBUG
static enum ioc_reply
case E1000G_IOC_REG_PEEK:
case E1000G_IOC_REG_POKE:
return (IOC_INVAL);
return (IOC_INVAL);
return (IOC_INVAL);
return (IOC_INVAL);
case E1000G_PP_SPACE_REG:
return (IOC_INVAL);
return (IOC_INVAL);
mem_va = 0;
case E1000G_PP_SPACE_E1000G:
return (IOC_INVAL);
return (IOC_INVAL);
void *vaddr;
void *vaddr;
static enum ioc_reply
return (IOC_INVAL);
return (IOC_INVAL);
return (IOC_INVAL);
case LB_GET_INFO_SIZE:
return (IOC_INVAL);
case e1000_82571:
case e1000_82572:
case e1000_80003es2lan:
case LB_GET_INFO:
case e1000_82571:
case e1000_82572:
case e1000_80003es2lan:
return (IOC_INVAL);
value = 0;
case e1000_82571:
case e1000_82572:
case e1000_80003es2lan:
case LB_GET_MODE:
return (IOC_INVAL);
case LB_SET_MODE:
size = 0;
return (IOC_INVAL);
return (IOC_INVAL);
return (IOC_INVAL);
return (IOC_REPLY);
static boolean_t
case e1000_82540:
case e1000_82545:
case e1000_82545_rev_3:
case e1000_82546:
case e1000_82546_rev_3:
case e1000_82541:
case e1000_82541_rev_2:
case e1000_82547:
case e1000_82547_rev_2:
case e1000_82571:
case e1000_82572:
case e1000_82573:
case e1000_82574:
case e1000_80003es2lan:
case e1000_ich9lan:
case e1000_ich10lan:
return (B_TRUE);
return (B_FALSE);
static boolean_t
int i, times;
return (B_TRUE);
times = 0;
return (B_TRUE);
switch (mode) {
return (B_FALSE);
case E1000G_LB_EXTERNAL_1000:
case E1000G_LB_EXTERNAL_100:
case E1000G_LB_EXTERNAL_10:
case E1000G_LB_INTERNAL_PHY:
times++;
if (!link_up) {
goto again;
return (B_FALSE);
return (B_TRUE);
case e1000_82540:
case e1000_82545:
case e1000_82545_rev_3:
case e1000_82546:
case e1000_82546_rev_3:
case e1000_82573:
case e1000_80003es2lan:
case e1000_82540:
case e1000_82545:
case e1000_82545_rev_3:
case e1000_82546:
case e1000_82546_rev_3:
case e1000_82571:
case e1000_82572:
case e1000_82573:
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_82571:
case e1000_82572:
case e1000_media_type_copper:
case e1000_media_type_fiber:
case e1000_82574:
case e1000_80003es2lan:
case e1000_ich9lan:
case e1000_ich10lan:
#ifdef __sparc
static boolean_t
int err;
while (nelts--)
while (nelts--)
if (found) {
return (found);
int intr_types;
int rc;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
int flag;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
for (y = 0; y < actual; y++)
return (DDI_FAILURE);
for (x = 0; x < actual; x++) {
(void) ddi_intr_remove_handler(
for (y = 0; y < actual; y++)
return (DDI_FAILURE);
for (y = 0; y < actual; y++) {
return (DDI_FAILURE);
return (DDI_SUCCESS);
int rc;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
int rc;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
int rc;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
int fma_dma_flag;
fma_dma_flag = 0;
return (DDI_FAILURE);
return (DDI_SUCCESS);
case e1000_82573:
case e1000_82571:
case e1000_82572:
case e1000_82574:
case e1000_80003es2lan:
case e1000_ich8lan:
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_pchlan:
case e1000_pch2lan:
case e1000_82573:
case e1000_82571:
case e1000_82572:
case e1000_82574:
case e1000_80003es2lan:
case e1000_ich8lan:
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_pchlan:
case e1000_pch2lan: