Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixgbe/if_ixv.c
Show All 39 Lines | |||||
#include "ifdi_if.h" | #include "ifdi_if.h" | ||||
#include <net/netmap.h> | #include <net/netmap.h> | ||||
#include <dev/netmap/netmap_kern.h> | #include <dev/netmap/netmap_kern.h> | ||||
/************************************************************************ | /************************************************************************ | ||||
* Driver version | * Driver version | ||||
************************************************************************/ | ************************************************************************/ | ||||
char ixv_driver_version[] = "2.0.0-k"; | char ixv_driver_version[] = "2.0.1-k"; | ||||
/************************************************************************ | /************************************************************************ | ||||
* PCI Device ID Table | * PCI Device ID Table | ||||
* | * | ||||
* Used by probe to select devices to load on | * Used by probe to select devices to load on | ||||
* Last field stores an index into ixv_strings | * Last field stores an index into ixv_strings | ||||
* Last entry must be all 0s | * Last entry must be all 0s | ||||
* | * | ||||
▲ Show 20 Lines • Show All 554 Lines • ▼ Show 20 Lines | ixv_if_init(if_ctx_t ctx) | ||||
hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); | hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); | ||||
/* Get the latest mac address, User can use a LAA */ | /* Get the latest mac address, User can use a LAA */ | ||||
bcopy(IF_LLADDR(ifp), hw->mac.addr, IXGBE_ETH_LENGTH_OF_ADDRESS); | bcopy(IF_LLADDR(ifp), hw->mac.addr, IXGBE_ETH_LENGTH_OF_ADDRESS); | ||||
hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, 1); | hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, 1); | ||||
/* Reset VF and renegotiate mailbox API version */ | /* Reset VF and renegotiate mailbox API version */ | ||||
hw->mac.ops.reset_hw(hw); | hw->mac.ops.reset_hw(hw); | ||||
hw->mac.ops.start_hw(hw); | |||||
error = ixv_negotiate_api(adapter); | error = ixv_negotiate_api(adapter); | ||||
if (error) { | if (error) { | ||||
device_printf(dev, | device_printf(dev, | ||||
"Mailbox API negotiation failed in if_init!\n"); | "Mailbox API negotiation failed in if_init!\n"); | ||||
return; | return; | ||||
} | } | ||||
ixv_initialize_transmit_units(ctx); | ixv_initialize_transmit_units(ctx); | ||||
▲ Show 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | |||||
* The real check of the hardware only happens with | * The real check of the hardware only happens with | ||||
* a link interrupt. | * a link interrupt. | ||||
************************************************************************/ | ************************************************************************/ | ||||
static void | static void | ||||
ixv_if_update_admin_status(if_ctx_t ctx) | ixv_if_update_admin_status(if_ctx_t ctx) | ||||
{ | { | ||||
struct adapter *adapter = iflib_get_softc(ctx); | struct adapter *adapter = iflib_get_softc(ctx); | ||||
device_t dev = iflib_get_dev(ctx); | device_t dev = iflib_get_dev(ctx); | ||||
s32 status; | |||||
adapter->hw.mac.get_link_status = TRUE; | adapter->hw.mac.get_link_status = TRUE; | ||||
ixgbe_check_link(&adapter->hw, &adapter->link_speed, &adapter->link_up, | |||||
FALSE); | status = ixgbe_check_link(&adapter->hw, &adapter->link_speed, | ||||
&adapter->link_up, FALSE); | |||||
if (status != IXGBE_SUCCESS && adapter->hw.adapter_stopped == FALSE) { | |||||
/* Mailbox's Clear To Send status is lost or timeout occurred. | |||||
* We need reinitialization. */ | |||||
iflib_get_ifp(ctx)->if_init(ctx); | |||||
} | |||||
if (adapter->link_up) { | if (adapter->link_up) { | ||||
if (adapter->link_active == FALSE) { | if (adapter->link_active == FALSE) { | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(dev, "Link is up %d Gbps %s \n", | device_printf(dev, "Link is up %d Gbps %s \n", | ||||
((adapter->link_speed == 128) ? 10 : 1), | ((adapter->link_speed == 128) ? 10 : 1), | ||||
"Full Duplex"); | "Full Duplex"); | ||||
adapter->link_active = TRUE; | adapter->link_active = TRUE; | ||||
▲ Show 20 Lines • Show All 988 Lines • Show Last 20 Lines |