Skip to content

Commit c2fe9ec

Browse files
committed
Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue
Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2022-07-18 This series contains updates to igc driver only. Kurt Kanzenbach adds support for Qbv schedules where one queue stays open in consecutive entries. Sasha removes an unused define and field. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igc: Remove forced_speed_duplex value igc: Remove MSI-X PBA Clear register igc: Lift TAPRIO schedule restriction ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents ca0cab1 + 6ac0db3 commit c2fe9ec

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

drivers/net/ethernet/intel/igc/igc_hw.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ struct igc_mac_info {
8989
u32 mta_shadow[MAX_MTA_REG];
9090
u16 rar_entry_count;
9191

92-
u8 forced_speed_duplex;
93-
9492
bool asf_firmware_present;
9593
bool arc_subsystem_valid;
9694

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5813,9 +5813,10 @@ static bool validate_schedule(struct igc_adapter *adapter,
58135813
return false;
58145814

58155815
for (n = 0; n < qopt->num_entries; n++) {
5816-
const struct tc_taprio_sched_entry *e;
5816+
const struct tc_taprio_sched_entry *e, *prev;
58175817
int i;
58185818

5819+
prev = n ? &qopt->entries[n - 1] : NULL;
58195820
e = &qopt->entries[n];
58205821

58215822
/* i225 only supports "global" frame preemption
@@ -5828,7 +5829,12 @@ static bool validate_schedule(struct igc_adapter *adapter,
58285829
if (e->gate_mask & BIT(i))
58295830
queue_uses[i]++;
58305831

5831-
if (queue_uses[i] > 1)
5832+
/* There are limitations: A single queue cannot be
5833+
* opened and closed multiple times per cycle unless the
5834+
* gate stays open. Check for it.
5835+
*/
5836+
if (queue_uses[i] > 1 &&
5837+
!(prev->gate_mask & BIT(i)))
58325838
return false;
58335839
}
58345840
}
@@ -5872,6 +5878,7 @@ static int igc_tsn_clear_schedule(struct igc_adapter *adapter)
58725878
static int igc_save_qbv_schedule(struct igc_adapter *adapter,
58735879
struct tc_taprio_qopt_offload *qopt)
58745880
{
5881+
bool queue_configured[IGC_MAX_TX_QUEUES] = { };
58755882
u32 start_time = 0, end_time = 0;
58765883
size_t n;
58775884

@@ -5887,9 +5894,6 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
58875894
adapter->cycle_time = qopt->cycle_time;
58885895
adapter->base_time = qopt->base_time;
58895896

5890-
/* FIXME: be a little smarter about cases when the gate for a
5891-
* queue stays open for more than one entry.
5892-
*/
58935897
for (n = 0; n < qopt->num_entries; n++) {
58945898
struct tc_taprio_sched_entry *e = &qopt->entries[n];
58955899
int i;
@@ -5902,8 +5906,15 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
59025906
if (!(e->gate_mask & BIT(i)))
59035907
continue;
59045908

5905-
ring->start_time = start_time;
5909+
/* Check whether a queue stays open for more than one
5910+
* entry. If so, keep the start and advance the end
5911+
* time.
5912+
*/
5913+
if (!queue_configured[i])
5914+
ring->start_time = start_time;
59065915
ring->end_time = end_time;
5916+
5917+
queue_configured[i] = true;
59075918
}
59085919

59095920
start_time += e->interval;

drivers/net/ethernet/intel/igc/igc_regs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@
5959
#define IGC_IVAR_MISC 0x01740 /* IVAR for "other" causes - RW */
6060
#define IGC_GPIE 0x01514 /* General Purpose Intr Enable - RW */
6161

62-
/* MSI-X Table Register Descriptions */
63-
#define IGC_PBACL 0x05B68 /* MSIx PBA Clear - R/W 1 to clear */
64-
6562
/* RSS registers */
6663
#define IGC_MRQC 0x05818 /* Multiple Receive Control - RW */
6764

0 commit comments

Comments
 (0)