Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ethtool.c File Reference
#include <linux/types.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/vmalloc.h>
#include <linux/if_vlan.h>
#include <linux/uaccess.h>
#include "ixgbevf.h"

Go to the source code of this file.

Data Structures

struct  ixgbe_stats
 
struct  ixgbevf_reg_test
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define IXGBE_ALL_RAR_ENTRIES   16
 
#define IXGBEVF_STAT(m, b, r)
 
#define IXGBE_QUEUE_STATS_LEN   0
 
#define IXGBE_GLOBAL_STATS_LEN   ARRAY_SIZE(ixgbe_gstrings_stats)
 
#define IXGBEVF_STATS_LEN   (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN)
 
#define IXGBE_TEST_LEN   (sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN)
 
#define IXGBE_GET_STAT(_A_, _R_)   (_A_->stats._R_)
 
#define PATTERN_TEST   1
 
#define SET_READ_TEST   2
 
#define WRITE_NO_TEST   3
 
#define TABLE32_TEST   4
 
#define TABLE64_TEST_LO   5
 
#define TABLE64_TEST_HI   6
 
#define REG_PATTERN_TEST(R, M, W)
 
#define REG_SET_AND_CHECK(R, M, W)
 

Functions

void ixgbevf_set_ethtool_ops (struct net_device *netdev)
 

Macro Definition Documentation

#define IXGBE_ALL_RAR_ENTRIES   16

Definition at line 44 of file ethtool.c.

#define IXGBE_GET_STAT (   _A_,
  _R_ 
)    (_A_->stats._R_)

Definition at line 140 of file ethtool.c.

#define IXGBE_GLOBAL_STATS_LEN   ARRAY_SIZE(ixgbe_gstrings_stats)

Definition at line 80 of file ethtool.c.

#define IXGBE_QUEUE_STATS_LEN   0

Definition at line 79 of file ethtool.c.

#define IXGBE_TEST_LEN   (sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN)

Definition at line 87 of file ethtool.c.

#define IXGBEVF_STAT (   m,
  b,
  r 
)
Value:
sizeof(((struct ixgbevf_adapter *)0)->m), \
offsetof(struct ixgbevf_adapter, b), \
offsetof(struct ixgbevf_adapter, r)

Definition at line 54 of file ethtool.c.

#define IXGBEVF_STATS_LEN   (IXGBE_GLOBAL_STATS_LEN + IXGBE_QUEUE_STATS_LEN)

Definition at line 82 of file ethtool.c.

#define PATTERN_TEST   1

Definition at line 516 of file ethtool.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 30 of file ethtool.c.

#define REG_PATTERN_TEST (   R,
  M,
  W 
)
Value:
{ \
u32 pat, val, before; \
for (pat = 0; pat < ARRAY_SIZE(register_test_patterns); pat++) { \
before = readl(adapter->hw.hw_addr + R); \
writel((register_test_patterns[pat] & W), \
(adapter->hw.hw_addr + R)); \
val = readl(adapter->hw.hw_addr + R); \
if (val != (register_test_patterns[pat] & W & M)) { \
hw_dbg(&adapter->hw, \
"pattern test reg %04X failed: got " \
"0x%08X expected 0x%08X\n", \
R, val, (register_test_patterns[pat] & W & M)); \
*data = R; \
writel(before, adapter->hw.hw_addr + R); \
return 1; \
} \
writel(before, adapter->hw.hw_addr + R); \
} \
}

Definition at line 541 of file ethtool.c.

#define REG_SET_AND_CHECK (   R,
  M,
  W 
)
Value:
{ \
u32 val, before; \
before = readl(adapter->hw.hw_addr + R); \
writel((W & M), (adapter->hw.hw_addr + R)); \
val = readl(adapter->hw.hw_addr + R); \
if ((W & M) != (val & M)) { \
pr_err("set/check reg %04X test failed: got 0x%08X expected " \
"0x%08X\n", R, (val & M), (W & M)); \
*data = R; \
writel(before, (adapter->hw.hw_addr + R)); \
return 1; \
} \
writel(before, (adapter->hw.hw_addr + R)); \
}

Definition at line 562 of file ethtool.c.

#define SET_READ_TEST   2

Definition at line 517 of file ethtool.c.

#define TABLE32_TEST   4

Definition at line 519 of file ethtool.c.

#define TABLE64_TEST_HI   6

Definition at line 521 of file ethtool.c.

#define TABLE64_TEST_LO   5

Definition at line 520 of file ethtool.c.

#define WRITE_NO_TEST   3

Definition at line 518 of file ethtool.c.

Function Documentation

void ixgbevf_set_ethtool_ops ( struct net_device netdev)

Definition at line 704 of file ethtool.c.