Richard Cochran
2016-12-22 18:13:59 UTC
Richard, I'm lost already. My igb driver 5.3.5.4 does not have
igb_tsync_interrupt().
See attached source for igb_main.c. Am I supposed to be using some other
version of the igb driver?
Well, you can use anything you want, but that file is rather out ofigb_tsync_interrupt().
See attached source for igb_main.c. Am I supposed to be using some other
version of the igb driver?
date WRT the mainline Linux driver. It lacks this change
commit 61d7f75f45231e4a2f2ab7d975555f55f0019800
Author: Richard Cochran <***@gmail.com>
Date: Fri Nov 21 20:51:10 2014 +0000
igb: refactor time sync interrupt handling
The code that handles the time sync interrupt is repeated in three
different places. This patch refactors the identical code blocks into
a single helper function.
which was merged in v4.0. I recommend using a recent mainline kernel version.
static irqreturn_t igb_msix_other(int irq, void *data)
{
...{
#ifdef HAVE_PTP_1588_CLOCK
if (icr & E1000_ICR_TS) {
u32 tsicr = E1000_READ_REG(hw, E1000_TSICR);
if (tsicr & E1000_TSICR_TXTS) {
/* acknowledge the interrupt */
E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
/* retrieve hardware timestamp */
schedule_work(&adapter->ptp_tx_work);
}
}
#endif /* HAVE_PTP_1588_CLOCK */
...if (icr & E1000_ICR_TS) {
u32 tsicr = E1000_READ_REG(hw, E1000_TSICR);
if (tsicr & E1000_TSICR_TXTS) {
/* acknowledge the interrupt */
E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
/* retrieve hardware timestamp */
schedule_work(&adapter->ptp_tx_work);
}
}
#endif /* HAVE_PTP_1588_CLOCK */
return IRQ_HANDLED;
}
static irqreturn_t igb_intr_msi(int irq, void *data)
{
...}
static irqreturn_t igb_intr_msi(int irq, void *data)
{
#ifdef HAVE_PTP_1588_CLOCK
if (icr & E1000_ICR_TS) {
u32 tsicr = E1000_READ_REG(hw, E1000_TSICR);
if (tsicr & E1000_TSICR_TXTS) {
/* acknowledge the interrupt */
E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
/* retrieve hardware timestamp */
schedule_work(&adapter->ptp_tx_work);
}
}
#endif /* HAVE_PTP_1588_CLOCK */
...if (icr & E1000_ICR_TS) {
u32 tsicr = E1000_READ_REG(hw, E1000_TSICR);
if (tsicr & E1000_TSICR_TXTS) {
/* acknowledge the interrupt */
E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
/* retrieve hardware timestamp */
schedule_work(&adapter->ptp_tx_work);
}
}
#endif /* HAVE_PTP_1588_CLOCK */
return IRQ_HANDLED;
}
static irqreturn_t igb_intr(int irq, void *data)
{
...}
static irqreturn_t igb_intr(int irq, void *data)
{
#ifdef HAVE_PTP_1588_CLOCK
if (icr & E1000_ICR_TS) {
u32 tsicr = E1000_READ_REG(hw, E1000_TSICR);
if (tsicr & E1000_TSICR_TXTS) {
/* acknowledge the interrupt */
E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
/* retrieve hardware timestamp */
schedule_work(&adapter->ptp_tx_work);
}
}
#endif /* HAVE_PTP_1588_CLOCK */
..if (icr & E1000_ICR_TS) {
u32 tsicr = E1000_READ_REG(hw, E1000_TSICR);
if (tsicr & E1000_TSICR_TXTS) {
/* acknowledge the interrupt */
E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
/* retrieve hardware timestamp */
schedule_work(&adapter->ptp_tx_work);
}
}
#endif /* HAVE_PTP_1588_CLOCK */
return IRQ_HANDLED;
}
Try deleting the lines}
/* acknowledge the interrupt */
E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
in each of the three cases.E1000_WRITE_REG(hw, E1000_TSICR, E1000_TSICR_TXTS);
HTH,
Richard