Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74e04aca authored by David S. Miller's avatar David S. Miller
Browse files
parents 01da0c2b eef4560f
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -220,6 +220,17 @@ config IXGBE_DCB


	  If unsure, say N.
	  If unsure, say N.


config IXGBE_PTP
	bool "PTP Clock Support"
	default n
	depends on IXGBE && PTP_1588_CLOCK
	---help---
	  Say Y here if you want support for 1588 Timestamping with a
	  PHC device, using the PTP 1588 Clock support. This is
	  required to enable timestamping support for the device.

	  If unsure, say N.

config IXGBEVF
config IXGBEVF
	tristate "Intel(R) 82599 Virtual Function Ethernet support"
	tristate "Intel(R) 82599 Virtual Function Ethernet support"
	depends on PCI_MSI
	depends on PCI_MSI
+37 −1
Original line number Original line Diff line number Diff line
@@ -335,7 +335,7 @@ static void igb_set_msglevel(struct net_device *netdev, u32 data)


static int igb_get_regs_len(struct net_device *netdev)
static int igb_get_regs_len(struct net_device *netdev)
{
{
#define IGB_REGS_LEN 551
#define IGB_REGS_LEN 739
	return IGB_REGS_LEN * sizeof(u32);
	return IGB_REGS_LEN * sizeof(u32);
}
}


@@ -556,6 +556,42 @@ static void igb_get_regs(struct net_device *netdev,
	regs_buff[552] = adapter->stats.b2ospc;
	regs_buff[552] = adapter->stats.b2ospc;
	regs_buff[553] = adapter->stats.o2bspc;
	regs_buff[553] = adapter->stats.o2bspc;
	regs_buff[554] = adapter->stats.b2ogprc;
	regs_buff[554] = adapter->stats.b2ogprc;

	if (hw->mac.type != e1000_82576)
		return;
	for (i = 0; i < 12; i++)
		regs_buff[555 + i] = rd32(E1000_SRRCTL(i + 4));
	for (i = 0; i < 4; i++)
		regs_buff[567 + i] = rd32(E1000_PSRTYPE(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[571 + i] = rd32(E1000_RDBAL(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[583 + i] = rd32(E1000_RDBAH(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[595 + i] = rd32(E1000_RDLEN(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[607 + i] = rd32(E1000_RDH(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[619 + i] = rd32(E1000_RDT(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[631 + i] = rd32(E1000_RXDCTL(i + 4));

	for (i = 0; i < 12; i++)
		regs_buff[643 + i] = rd32(E1000_TDBAL(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[655 + i] = rd32(E1000_TDBAH(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[667 + i] = rd32(E1000_TDLEN(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[679 + i] = rd32(E1000_TDH(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[691 + i] = rd32(E1000_TDT(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[703 + i] = rd32(E1000_TXDCTL(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[715 + i] = rd32(E1000_TDWBAL(i + 4));
	for (i = 0; i < 12; i++)
		regs_buff[727 + i] = rd32(E1000_TDWBAH(i + 4));
}
}


static int igb_get_eeprom_len(struct net_device *netdev)
static int igb_get_eeprom_len(struct net_device *netdev)
+2 −0
Original line number Original line Diff line number Diff line
@@ -39,4 +39,6 @@ ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \
ixgbe-$(CONFIG_IXGBE_DCB) +=  ixgbe_dcb.o ixgbe_dcb_82598.o \
ixgbe-$(CONFIG_IXGBE_DCB) +=  ixgbe_dcb.o ixgbe_dcb_82598.o \
                              ixgbe_dcb_82599.o ixgbe_dcb_nl.o
                              ixgbe_dcb_82599.o ixgbe_dcb_nl.o


ixgbe-$(CONFIG_IXGBE_PTP) += ixgbe_ptp.o

ixgbe-$(CONFIG_FCOE:m=y) += ixgbe_fcoe.o
ixgbe-$(CONFIG_FCOE:m=y) += ixgbe_fcoe.o
+37 −0
Original line number Original line Diff line number Diff line
@@ -36,6 +36,12 @@
#include <linux/aer.h>
#include <linux/aer.h>
#include <linux/if_vlan.h>
#include <linux/if_vlan.h>


#ifdef CONFIG_IXGBE_PTP
#include <linux/clocksource.h>
#include <linux/net_tstamp.h>
#include <linux/ptp_clock_kernel.h>
#endif /* CONFIG_IXGBE_PTP */

#include "ixgbe_type.h"
#include "ixgbe_type.h"
#include "ixgbe_common.h"
#include "ixgbe_common.h"
#include "ixgbe_dcb.h"
#include "ixgbe_dcb.h"
@@ -96,6 +102,7 @@
#define IXGBE_TX_FLAGS_FCOE		(u32)(1 << 5)
#define IXGBE_TX_FLAGS_FCOE		(u32)(1 << 5)
#define IXGBE_TX_FLAGS_FSO		(u32)(1 << 6)
#define IXGBE_TX_FLAGS_FSO		(u32)(1 << 6)
#define IXGBE_TX_FLAGS_TXSW		(u32)(1 << 7)
#define IXGBE_TX_FLAGS_TXSW		(u32)(1 << 7)
#define IXGBE_TX_FLAGS_TSTAMP		(u32)(1 << 8)
#define IXGBE_TX_FLAGS_VLAN_MASK	0xffff0000
#define IXGBE_TX_FLAGS_VLAN_MASK	0xffff0000
#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK	0xe0000000
#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK	0xe0000000
#define IXGBE_TX_FLAGS_VLAN_PRIO_SHIFT  29
#define IXGBE_TX_FLAGS_VLAN_PRIO_SHIFT  29
@@ -458,6 +465,8 @@ struct ixgbe_adapter {
#define IXGBE_FLAG2_FDIR_REQUIRES_REINIT        (u32)(1 << 7)
#define IXGBE_FLAG2_FDIR_REQUIRES_REINIT        (u32)(1 << 7)
#define IXGBE_FLAG2_RSS_FIELD_IPV4_UDP		(u32)(1 << 8)
#define IXGBE_FLAG2_RSS_FIELD_IPV4_UDP		(u32)(1 << 8)
#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP		(u32)(1 << 9)
#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP		(u32)(1 << 9)
#define IXGBE_FLAG2_OVERFLOW_CHECK_ENABLED	(u32)(1 << 10)
#define IXGBE_FLAG2_PTP_PPS_ENABLED		(u32)(1 << 11)


	/* Tx fast path data */
	/* Tx fast path data */
	int num_tx_queues;
	int num_tx_queues;
@@ -545,6 +554,17 @@ struct ixgbe_adapter {
	u32 interrupt_event;
	u32 interrupt_event;
	u32 led_reg;
	u32 led_reg;


#ifdef CONFIG_IXGBE_PTP
	struct ptp_clock *ptp_clock;
	struct ptp_clock_info ptp_caps;
	unsigned long last_overflow_check;
	spinlock_t tmreg_lock;
	struct cyclecounter cc;
	struct timecounter tc;
	u32 base_incval;
	u32 cycle_speed;
#endif /* CONFIG_IXGBE_PTP */

	/* SR-IOV */
	/* SR-IOV */
	DECLARE_BITMAP(active_vfs, IXGBE_MAX_VF_FUNCTIONS);
	DECLARE_BITMAP(active_vfs, IXGBE_MAX_VF_FUNCTIONS);
	unsigned int num_vfs;
	unsigned int num_vfs;
@@ -652,12 +672,15 @@ extern void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,
						 union ixgbe_atr_input *mask);
						 union ixgbe_atr_input *mask);
extern void ixgbe_set_rx_mode(struct net_device *netdev);
extern void ixgbe_set_rx_mode(struct net_device *netdev);
#ifdef CONFIG_IXGBE_DCB
#ifdef CONFIG_IXGBE_DCB
extern void ixgbe_set_rx_drop_en(struct ixgbe_adapter *adapter);
extern int ixgbe_setup_tc(struct net_device *dev, u8 tc);
extern int ixgbe_setup_tc(struct net_device *dev, u8 tc);
#endif
#endif
extern void ixgbe_tx_ctxtdesc(struct ixgbe_ring *, u32, u32, u32, u32);
extern void ixgbe_tx_ctxtdesc(struct ixgbe_ring *, u32, u32, u32, u32);
extern void ixgbe_do_reset(struct net_device *netdev);
extern void ixgbe_do_reset(struct net_device *netdev);
#ifdef CONFIG_IXGBE_HWMON
extern void ixgbe_sysfs_exit(struct ixgbe_adapter *adapter);
extern void ixgbe_sysfs_exit(struct ixgbe_adapter *adapter);
extern int ixgbe_sysfs_init(struct ixgbe_adapter *adapter);
extern int ixgbe_sysfs_init(struct ixgbe_adapter *adapter);
#endif /* CONFIG_IXGBE_HWMON */
#ifdef IXGBE_FCOE
#ifdef IXGBE_FCOE
extern void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter);
extern void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter);
extern int ixgbe_fso(struct ixgbe_ring *tx_ring,
extern int ixgbe_fso(struct ixgbe_ring *tx_ring,
@@ -688,4 +711,18 @@ static inline struct netdev_queue *txring_txq(const struct ixgbe_ring *ring)
	return netdev_get_tx_queue(ring->netdev, ring->queue_index);
	return netdev_get_tx_queue(ring->netdev, ring->queue_index);
}
}


#ifdef CONFIG_IXGBE_PTP
extern void ixgbe_ptp_init(struct ixgbe_adapter *adapter);
extern void ixgbe_ptp_stop(struct ixgbe_adapter *adapter);
extern void ixgbe_ptp_overflow_check(struct ixgbe_adapter *adapter);
extern void ixgbe_ptp_tx_hwtstamp(struct ixgbe_q_vector *q_vector,
				  struct sk_buff *skb);
extern void ixgbe_ptp_rx_hwtstamp(struct ixgbe_q_vector *q_vector,
				  struct sk_buff *skb);
extern int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
				    struct ifreq *ifr, int cmd);
extern void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter);
extern void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr);
#endif /* CONFIG_IXGBE_PTP */

#endif /* _IXGBE_H_ */
#endif /* _IXGBE_H_ */
+1 −1
Original line number Original line Diff line number Diff line
@@ -2561,7 +2561,7 @@ s32 ixgbe_disable_rx_buff_generic(struct ixgbe_hw *hw)
			break;
			break;
		else
		else
			/* Use interrupt-safe sleep just in case */
			/* Use interrupt-safe sleep just in case */
			udelay(10);
			udelay(1000);
	}
	}


	/* For informational purposes only */
	/* For informational purposes only */
Loading