Skip to content

Commit ff8744b

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue
Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-06-25 This series contains updates to ice driver only. Jesse adds support for tracepoints to aide in debugging. Maciej adds support for PTP auxiliary pin support. Victor removes the VSI info from the old aggregator when moving the VSI to another aggregator. Tony removes an unnecessary VSI assignment. Christophe Jaillet fixes a memory leak for failed allocation in ice_pf_dcb_cfg(). ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 1708163 + b81c191 commit ff8744b

File tree

9 files changed

+641
-5
lines changed

9 files changed

+641
-5
lines changed

drivers/net/ethernet/intel/ice/ice_dcb_lib.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,10 @@ int ice_pf_dcb_cfg(struct ice_pf *pf, struct ice_dcbx_cfg *new_cfg, bool locked)
316316

317317
/* Notify AUX drivers about impending change to TCs */
318318
event = kzalloc(sizeof(*event), GFP_KERNEL);
319-
if (!event)
320-
return -ENOMEM;
319+
if (!event) {
320+
ret = -ENOMEM;
321+
goto free_cfg;
322+
}
321323

322324
set_bit(IIDC_EVENT_BEFORE_TC_CHANGE, event->type);
323325
ice_send_event_to_aux(pf, event);

drivers/net/ethernet/intel/ice/ice_hw_autogen.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@
138138
#define GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_S 4
139139
#define GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_M ICE_M(0x3, 4)
140140
#define GLGEN_CLKSTAT_SRC 0x000B826C
141+
#define GLGEN_GPIO_CTL(_i) (0x000880C8 + ((_i) * 4))
142+
#define GLGEN_GPIO_CTL_PIN_DIR_M BIT(4)
143+
#define GLGEN_GPIO_CTL_PIN_FUNC_S 8
144+
#define GLGEN_GPIO_CTL_PIN_FUNC_M ICE_M(0xF, 8)
141145
#define GLGEN_RSTAT 0x000B8188
142146
#define GLGEN_RSTAT_DEVSTATE_M ICE_M(0x3, 0)
143147
#define GLGEN_RSTCTL 0x000B8180
@@ -203,6 +207,7 @@
203207
#define PFINT_MBX_CTL_CAUSE_ENA_M BIT(30)
204208
#define PFINT_OICR 0x0016CA00
205209
#define PFINT_OICR_TSYN_TX_M BIT(11)
210+
#define PFINT_OICR_TSYN_EVNT_M BIT(12)
206211
#define PFINT_OICR_ECC_ERR_M BIT(16)
207212
#define PFINT_OICR_MAL_DETECT_M BIT(19)
208213
#define PFINT_OICR_GRST_M BIT(20)
@@ -434,10 +439,18 @@
434439
#define GLV_UPRCL(_i) (0x003B2000 + ((_i) * 8))
435440
#define GLV_UPTCL(_i) (0x0030A000 + ((_i) * 8))
436441
#define PRTRPB_RDPC 0x000AC260
442+
#define GLTSYN_AUX_IN_0(_i) (0x000889D8 + ((_i) * 4))
443+
#define GLTSYN_AUX_IN_0_INT_ENA_M BIT(4)
444+
#define GLTSYN_AUX_OUT_0(_i) (0x00088998 + ((_i) * 4))
445+
#define GLTSYN_AUX_OUT_0_OUT_ENA_M BIT(0)
446+
#define GLTSYN_AUX_OUT_0_OUTMOD_M ICE_M(0x3, 1)
447+
#define GLTSYN_CLKO_0(_i) (0x000889B8 + ((_i) * 4))
437448
#define GLTSYN_CMD 0x00088810
438449
#define GLTSYN_CMD_SYNC 0x00088814
439450
#define GLTSYN_ENA(_i) (0x00088808 + ((_i) * 4))
440451
#define GLTSYN_ENA_TSYN_ENA_M BIT(0)
452+
#define GLTSYN_EVNT_H_0(_i) (0x00088970 + ((_i) * 4))
453+
#define GLTSYN_EVNT_L_0(_i) (0x00088968 + ((_i) * 4))
441454
#define GLTSYN_INCVAL_H(_i) (0x00088920 + ((_i) * 4))
442455
#define GLTSYN_INCVAL_L(_i) (0x00088918 + ((_i) * 4))
443456
#define GLTSYN_SHADJ_H(_i) (0x00088910 + ((_i) * 4))
@@ -446,7 +459,12 @@
446459
#define GLTSYN_SHTIME_H(_i) (0x000888F0 + ((_i) * 4))
447460
#define GLTSYN_SHTIME_L(_i) (0x000888E8 + ((_i) * 4))
448461
#define GLTSYN_STAT(_i) (0x000888C0 + ((_i) * 4))
462+
#define GLTSYN_STAT_EVENT0_M BIT(0)
463+
#define GLTSYN_STAT_EVENT1_M BIT(1)
464+
#define GLTSYN_STAT_EVENT2_M BIT(2)
449465
#define GLTSYN_SYNC_DLAY 0x00088818
466+
#define GLTSYN_TGT_H_0(_i) (0x00088930 + ((_i) * 4))
467+
#define GLTSYN_TGT_L_0(_i) (0x00088928 + ((_i) * 4))
450468
#define GLTSYN_TIME_H(_i) (0x000888D8 + ((_i) * 4))
451469
#define GLTSYN_TIME_L(_i) (0x000888D0 + ((_i) * 4))
452470
#define PFTSYN_SEM 0x00088880

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
#include "ice_dcb_lib.h"
1414
#include "ice_dcb_nl.h"
1515
#include "ice_devlink.h"
16+
/* Including ice_trace.h with CREATE_TRACE_POINTS defined will generate the
17+
* ice tracepoint functions. This must be done exactly once across the
18+
* ice driver.
19+
*/
20+
#define CREATE_TRACE_POINTS
21+
#include "ice_trace.h"
1622

1723
#define DRV_SUMMARY "Intel(R) Ethernet Connection E800 Series Linux Driver"
1824
static const char ice_driver_string[] = DRV_SUMMARY;
@@ -2811,6 +2817,18 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
28112817
ice_ptp_process_ts(pf);
28122818
}
28132819

2820+
if (oicr & PFINT_OICR_TSYN_EVNT_M) {
2821+
u8 tmr_idx = hw->func_caps.ts_func_info.tmr_index_owned;
2822+
u32 gltsyn_stat = rd32(hw, GLTSYN_STAT(tmr_idx));
2823+
2824+
/* Save EVENTs from GTSYN register */
2825+
pf->ptp.ext_ts_irq |= gltsyn_stat & (GLTSYN_STAT_EVENT0_M |
2826+
GLTSYN_STAT_EVENT1_M |
2827+
GLTSYN_STAT_EVENT2_M);
2828+
ena_mask &= ~PFINT_OICR_TSYN_EVNT_M;
2829+
kthread_queue_work(pf->ptp.kworker, &pf->ptp.extts_work);
2830+
}
2831+
28142832
#define ICE_AUX_CRIT_ERR (PFINT_OICR_PE_CRITERR_M | PFINT_OICR_HMC_ERR_M | PFINT_OICR_PE_PUSH_M)
28152833
if (oicr & ICE_AUX_CRIT_ERR) {
28162834
struct iidc_event *event;
@@ -5477,6 +5495,7 @@ static void ice_tx_dim_work(struct work_struct *work)
54775495
itr = tx_profile[dim->profile_ix].itr;
54785496
intrl = tx_profile[dim->profile_ix].intrl;
54795497

5498+
ice_trace(tx_dim_work, q_vector, dim);
54805499
ice_write_itr(rc, itr);
54815500
ice_write_intrl(q_vector, intrl);
54825501

@@ -5501,6 +5520,7 @@ static void ice_rx_dim_work(struct work_struct *work)
55015520
itr = rx_profile[dim->profile_ix].itr;
55025521
intrl = rx_profile[dim->profile_ix].intrl;
55035522

5523+
ice_trace(rx_dim_work, q_vector, dim);
55045524
ice_write_itr(rc, itr);
55055525
ice_write_intrl(q_vector, intrl);
55065526

0 commit comments

Comments
 (0)