Commit da4dd0f7 authored by Peter P Waskiewicz Jr's avatar Peter P Waskiewicz Jr Committed by David S. Miller

ixgbe: Add ethtool offline test support

This patch adds support for the ethtool internal test engine.
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1479ad4f
...@@ -223,6 +223,10 @@ struct ixgbe_q_vector { ...@@ -223,6 +223,10 @@ struct ixgbe_q_vector {
#define IXGBE_TX_CTXTDESC_ADV(R, i) \ #define IXGBE_TX_CTXTDESC_ADV(R, i) \
(&(((struct ixgbe_adv_tx_context_desc *)((R).desc))[i])) (&(((struct ixgbe_adv_tx_context_desc *)((R).desc))[i]))
#define IXGBE_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
#define IXGBE_TX_DESC(R, i) IXGBE_GET_DESC(R, i, ixgbe_legacy_tx_desc)
#define IXGBE_RX_DESC(R, i) IXGBE_GET_DESC(R, i, ixgbe_legacy_rx_desc)
#define IXGBE_MAX_JUMBO_FRAME_SIZE 16128 #define IXGBE_MAX_JUMBO_FRAME_SIZE 16128
#ifdef IXGBE_FCOE #ifdef IXGBE_FCOE
/* Use 3K as the baby jumbo frame size for FCoE */ /* Use 3K as the baby jumbo frame size for FCoE */
...@@ -327,6 +331,10 @@ struct ixgbe_adapter { ...@@ -327,6 +331,10 @@ struct ixgbe_adapter {
struct pci_dev *pdev; struct pci_dev *pdev;
struct net_device_stats net_stats; struct net_device_stats net_stats;
u32 test_icr;
struct ixgbe_ring test_tx_ring;
struct ixgbe_ring test_rx_ring;
/* structs defined in ixgbe_hw.h */ /* structs defined in ixgbe_hw.h */
struct ixgbe_hw hw; struct ixgbe_hw hw;
u16 msg_enable; u16 msg_enable;
......
This diff is collapsed.
...@@ -2598,12 +2598,19 @@ void ixgbe_reset(struct ixgbe_adapter *adapter) ...@@ -2598,12 +2598,19 @@ void ixgbe_reset(struct ixgbe_adapter *adapter)
int err; int err;
err = hw->mac.ops.init_hw(hw); err = hw->mac.ops.init_hw(hw);
if (err && (err != IXGBE_ERR_SFP_NOT_PRESENT)) switch (err) {
dev_err(&adapter->pdev->dev, "Hardware Error\n"); case 0:
case IXGBE_ERR_SFP_NOT_PRESENT:
break;
case IXGBE_ERR_MASTER_REQUESTS_PENDING:
dev_err(&adapter->pdev->dev, "master disable timed out\n");
break;
default:
dev_err(&adapter->pdev->dev, "Hardware Error: %d\n", err);
}
/* reprogram the RAR[0] in case user changed it. */ /* reprogram the RAR[0] in case user changed it. */
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);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment