summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc/igc_main.c
diff options
context:
space:
mode:
authorTan Tee Min <tee.min.tan@linux.intel.com>2022-12-15 00:29:08 +0800
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-01-03 09:36:17 -0800
commit5ac1231ac14d1b8a1098048e51cad45f11b85c0a (patch)
tree6ffe8f2795252d80082bd1fdd32d7f8e1e05ed7d /drivers/net/ethernet/intel/igc/igc_main.c
parentb8897dc54e3bc9d25281bbb42a7d730782ff4588 (diff)
igc: enable Qbv configuration for 2nd GCL
Make reset task only executes for i225 and Qbv disabling to allow i226 configure for 2nd GCL without resetting the adapter. In i226, Tx won't hang if there is a GCL is already running, so in this case we don't need to set FutScdDis bit. Signed-off-by: Tan Tee Min <tee.min.tan@linux.intel.com> Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> Tested-by: Naama Meir <naamax.meir@linux.intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 988131d7acd7..212560f22254 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -6020,7 +6020,7 @@ static int igc_tsn_enable_launchtime(struct igc_adapter *adapter,
if (err)
return err;
- return igc_tsn_offload_apply(adapter);
+ return igc_tsn_offload_apply(adapter, qopt->enable);
}
static int igc_tsn_clear_schedule(struct igc_adapter *adapter)
@@ -6044,6 +6044,7 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
struct tc_taprio_qopt_offload *qopt)
{
bool queue_configured[IGC_MAX_TX_QUEUES] = { };
+ struct igc_hw *hw = &adapter->hw;
u32 start_time = 0, end_time = 0;
size_t n;
int i;
@@ -6056,7 +6057,7 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
if (qopt->base_time < 0)
return -ERANGE;
- if (adapter->base_time)
+ if (igc_is_device_id_i225(hw) && adapter->base_time)
return -EALREADY;
if (!validate_schedule(adapter, qopt))
@@ -6133,7 +6134,7 @@ static int igc_tsn_enable_qbv_scheduling(struct igc_adapter *adapter,
if (err)
return err;
- return igc_tsn_offload_apply(adapter);
+ return igc_tsn_offload_apply(adapter, qopt->enable);
}
static int igc_save_cbs_params(struct igc_adapter *adapter, int queue,
@@ -6201,7 +6202,7 @@ static int igc_tsn_enable_cbs(struct igc_adapter *adapter,
if (err)
return err;
- return igc_tsn_offload_apply(adapter);
+ return igc_tsn_offload_apply(adapter, qopt->enable);
}
static int igc_setup_tc(struct net_device *dev, enum tc_setup_type type,