Skip to content

Commit a6c3766

Browse files
committed
Merge: atlantic: backports from v6.12+
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6285 JIRA: https://issues.redhat.com/browse/RHEL-73855 JIRA: https://issues.redhat.com/browse/RHEL-76480 Signed-off-by: Izabela Bakollari <ibakolla@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Kamal Heib <kheib@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Patrick Talbert <ptalbert@redhat.com>
2 parents 365309b + d5f76c3 commit a6c3766

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static void aq_ethtool_get_strings(struct net_device *ndev,
266266
const int rx_stat_cnt = ARRAY_SIZE(aq_ethtool_queue_rx_stat_names);
267267
const int tx_stat_cnt = ARRAY_SIZE(aq_ethtool_queue_tx_stat_names);
268268
char tc_string[8];
269-
int tc;
269+
unsigned int tc;
270270

271271
memset(tc_string, 0, sizeof(tc_string));
272272
memcpy(p, aq_ethtool_stat_names,
@@ -275,22 +275,20 @@ static void aq_ethtool_get_strings(struct net_device *ndev,
275275

276276
for (tc = 0; tc < cfg->tcs; tc++) {
277277
if (cfg->is_qos)
278-
snprintf(tc_string, 8, "TC%d ", tc);
278+
snprintf(tc_string, 8, "TC%u ", tc);
279279

280280
for (i = 0; i < cfg->vecs; i++) {
281281
for (si = 0; si < rx_stat_cnt; si++) {
282-
snprintf(p, ETH_GSTRING_LEN,
282+
ethtool_sprintf(&p,
283283
aq_ethtool_queue_rx_stat_names[si],
284284
tc_string,
285285
AQ_NIC_CFG_TCVEC2RING(cfg, tc, i));
286-
p += ETH_GSTRING_LEN;
287286
}
288287
for (si = 0; si < tx_stat_cnt; si++) {
289-
snprintf(p, ETH_GSTRING_LEN,
288+
ethtool_sprintf(&p,
290289
aq_ethtool_queue_tx_stat_names[si],
291290
tc_string,
292291
AQ_NIC_CFG_TCVEC2RING(cfg, tc, i));
293-
p += ETH_GSTRING_LEN;
294292
}
295293
}
296294
}
@@ -305,20 +303,18 @@ static void aq_ethtool_get_strings(struct net_device *ndev,
305303

306304
for (i = 0; i < max(rx_ring_cnt, tx_ring_cnt); i++) {
307305
for (si = 0; si < rx_stat_cnt; si++) {
308-
snprintf(p, ETH_GSTRING_LEN,
306+
ethtool_sprintf(&p,
309307
aq_ethtool_queue_rx_stat_names[si],
310308
tc_string,
311309
i ? PTP_HWST_RING_IDX : ptp_ring_idx);
312-
p += ETH_GSTRING_LEN;
313310
}
314311
if (i >= tx_ring_cnt)
315312
continue;
316313
for (si = 0; si < tx_stat_cnt; si++) {
317-
snprintf(p, ETH_GSTRING_LEN,
314+
ethtool_sprintf(&p,
318315
aq_ethtool_queue_tx_stat_names[si],
319316
tc_string,
320317
i ? PTP_HWST_RING_IDX : ptp_ring_idx);
321-
p += ETH_GSTRING_LEN;
322318
}
323319
}
324320
}
@@ -338,9 +334,8 @@ static void aq_ethtool_get_strings(struct net_device *ndev,
338334
for (si = 0;
339335
si < ARRAY_SIZE(aq_macsec_txsc_stat_names);
340336
si++) {
341-
snprintf(p, ETH_GSTRING_LEN,
337+
ethtool_sprintf(&p,
342338
aq_macsec_txsc_stat_names[si], i);
343-
p += ETH_GSTRING_LEN;
344339
}
345340
aq_txsc = &nic->macsec_cfg->aq_txsc[i];
346341
for (sa = 0; sa < MACSEC_NUM_AN; sa++) {
@@ -349,10 +344,9 @@ static void aq_ethtool_get_strings(struct net_device *ndev,
349344
for (si = 0;
350345
si < ARRAY_SIZE(aq_macsec_txsa_stat_names);
351346
si++) {
352-
snprintf(p, ETH_GSTRING_LEN,
347+
ethtool_sprintf(&p,
353348
aq_macsec_txsa_stat_names[si],
354349
i, sa);
355-
p += ETH_GSTRING_LEN;
356350
}
357351
}
358352
}
@@ -369,10 +363,9 @@ static void aq_ethtool_get_strings(struct net_device *ndev,
369363
for (si = 0;
370364
si < ARRAY_SIZE(aq_macsec_rxsa_stat_names);
371365
si++) {
372-
snprintf(p, ETH_GSTRING_LEN,
366+
ethtool_sprintf(&p,
373367
aq_macsec_rxsa_stat_names[si],
374368
i, sa);
375-
p += ETH_GSTRING_LEN;
376369
}
377370
}
378371
}

drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ int aq_pci_func_alloc_irq(struct aq_nic_s *self, unsigned int i,
162162
self->msix_entry_mask |= (1 << i);
163163

164164
if (pdev->msix_enabled && affinity_mask)
165-
irq_set_affinity_hint(pci_irq_vector(pdev, i),
166-
affinity_mask);
165+
irq_update_affinity_hint(pci_irq_vector(pdev, i),
166+
affinity_mask);
167167
}
168168

169169
return err;
@@ -187,7 +187,7 @@ void aq_pci_func_free_irqs(struct aq_nic_s *self)
187187
continue;
188188

189189
if (pdev->msix_enabled)
190-
irq_set_affinity_hint(pci_irq_vector(pdev, i), NULL);
190+
irq_update_affinity_hint(pci_irq_vector(pdev, i), NULL);
191191
free_irq(pci_irq_vector(pdev, i), irq_data);
192192
self->msix_entry_mask &= ~(1U << i);
193193
}

drivers/net/ethernet/aquantia/atlantic/aq_ring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ static int __aq_ring_rx_clean(struct aq_ring_s *self, struct napi_struct *napi,
557557
}
558558

559559
frag_cnt++;
560-
next_ = buff_->next,
560+
next_ = buff_->next;
561561
buff_ = &self->buff_ring[next_];
562562
is_rsc_completed =
563563
aq_ring_dx_in_range(self->sw_head,
@@ -583,7 +583,7 @@ static int __aq_ring_rx_clean(struct aq_ring_s *self, struct napi_struct *napi,
583583
err = -EIO;
584584
goto err_exit;
585585
}
586-
next_ = buff_->next,
586+
next_ = buff_->next;
587587
buff_ = &self->buff_ring[next_];
588588

589589
buff_->is_cleaned = true;

0 commit comments

Comments
 (0)