Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
igb_ptp.c File Reference
#include <linux/module.h>
#include <linux/device.h>
#include <linux/pci.h>
#include "igb.h"

Go to the source code of this file.

Macros

#define INCVALUE_MASK   0x7fffffff
 
#define ISGN   0x80000000
 
#define IGB_SYSTIM_OVERFLOW_PERIOD   (HZ * 60 * 9)
 
#define INCPERIOD_82576   (1 << E1000_TIMINCA_16NS_SHIFT)
 
#define INCVALUE_82576_MASK   ((1 << E1000_TIMINCA_16NS_SHIFT) - 1)
 
#define INCVALUE_82576   (16 << IGB_82576_TSYNC_SHIFT)
 
#define IGB_NBITS_82580   40
 
#define PTP_PORT   319
 

Functions

void igb_ptp_tx_work (struct work_struct *work)
 
void igb_ptp_tx_hwtstamp (struct igb_adapter *adapter)
 
void igb_ptp_rx_hwtstamp (struct igb_q_vector *q_vector, union e1000_adv_rx_desc *rx_desc, struct sk_buff *skb)
 
int igb_ptp_hwtstamp_ioctl (struct net_device *netdev, struct ifreq *ifr, int cmd)
 
void igb_ptp_init (struct igb_adapter *adapter)
 
void igb_ptp_stop (struct igb_adapter *adapter)
 
void igb_ptp_reset (struct igb_adapter *adapter)
 

Macro Definition Documentation

#define IGB_NBITS_82580   40

Definition at line 76 of file igb_ptp.c.

#define IGB_SYSTIM_OVERFLOW_PERIOD   (HZ * 60 * 9)

Definition at line 72 of file igb_ptp.c.

#define INCPERIOD_82576   (1 << E1000_TIMINCA_16NS_SHIFT)

Definition at line 73 of file igb_ptp.c.

#define INCVALUE_82576   (16 << IGB_82576_TSYNC_SHIFT)

Definition at line 75 of file igb_ptp.c.

#define INCVALUE_82576_MASK   ((1 << E1000_TIMINCA_16NS_SHIFT) - 1)

Definition at line 74 of file igb_ptp.c.

#define INCVALUE_MASK   0x7fffffff

Definition at line 26 of file igb_ptp.c.

#define ISGN   0x80000000

Definition at line 27 of file igb_ptp.c.

#define PTP_PORT   319

Function Documentation

int igb_ptp_hwtstamp_ioctl ( struct net_device netdev,
struct ifreq ifr,
int  cmd 
)

igb_ptp_hwtstamp_ioctl - control hardware time stamping : : :

Outgoing time stamping can be enabled and disabled. Play nice and disable it when requested, although it shouldn't case any overhead when no packet needs it. At most one packet in the queue may be marked for time stamping, otherwise it would be impossible to tell for sure to which packet the hardware time stamp belongs.

Incoming time stamping has to be configured via the hardware filters. Not all combinations are supported, in particular event type has to be specified. Matching the kind of event packet is not supported, with the exception of "all V2 events regardless of level 2 or 4".

Definition at line 502 of file igb_ptp.c.

void igb_ptp_init ( struct igb_adapter adapter)

Definition at line 665 of file igb_ptp.c.

void igb_ptp_reset ( struct igb_adapter adapter)

igb_ptp_reset - Re-enable the adapter for PTP following a reset. : Board private structure.

This function handles the reset work required to re-enable the PTP device.

Definition at line 805 of file igb_ptp.c.

void igb_ptp_rx_hwtstamp ( struct igb_q_vector q_vector,
union e1000_adv_rx_desc rx_desc,
struct sk_buff skb 
)

Definition at line 444 of file igb_ptp.c.

void igb_ptp_stop ( struct igb_adapter adapter)

igb_ptp_stop - Disable PTP device and stop the overflow check. : Board private structure.

This function stops the PTP support and cancels the delayed work.

Definition at line 773 of file igb_ptp.c.

void igb_ptp_tx_hwtstamp ( struct igb_adapter adapter)

igb_ptp_tx_hwtstamp - utility function which checks for TX time stamp : Board private structure.

If we were asked to do hardware stamping and such a time stamp is available, then it must have been for this skb here because we only allow only one such packet into the queue.

Definition at line 429 of file igb_ptp.c.

void igb_ptp_tx_work ( struct work_struct work)

igb_ptp_tx_work : pointer to work struct

This work function polls the TSYNCTXCTL valid bit to determine when a timestamp has been taken for the current stored skb.

Definition at line 389 of file igb_ptp.c.