Skip to content

Commit c9f9820

Browse files
committed
Merge: QED* driver updates for RHEL-9.7
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6868 JIRA: https://issues.redhat.com/browse/RHEL-72637 QED* driver updates for RHEL-9.7 Signed-off-by: John Meneghini <jmeneghi@redhat.com> Approved-by: Chris Leech <cleech@redhat.com> Approved-by: Nilesh Javali <njavali@redhat.com> Approved-by: Ewan D. Milne <emilne@redhat.com> Approved-by: Maurizio Lombardi <mlombard@redhat.com> Approved-by: Michal Schmidt <mschmidt@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents 69e0633 + e84c02f commit c9f9820

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+101
-123
lines changed

drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -648,18 +648,18 @@ netxen_nic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
648648
static void
649649
netxen_nic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
650650
{
651-
int index;
651+
const char *str;
652+
int i;
652653

653654
switch (stringset) {
654655
case ETH_SS_TEST:
655-
memcpy(data, *netxen_nic_gstrings_test,
656-
NETXEN_NIC_TEST_LEN * ETH_GSTRING_LEN);
656+
for (i = 0; i < NETXEN_NIC_TEST_LEN; i++)
657+
ethtool_puts(&data, netxen_nic_gstrings_test[i]);
657658
break;
658659
case ETH_SS_STATS:
659-
for (index = 0; index < NETXEN_NIC_STATS_LEN; index++) {
660-
memcpy(data + index * ETH_GSTRING_LEN,
661-
netxen_nic_gstrings_stats[index].stat_string,
662-
ETH_GSTRING_LEN);
660+
for (i = 0; i < NETXEN_NIC_STATS_LEN; i++) {
661+
str = netxen_nic_gstrings_stats[i].stat_string;
662+
ethtool_puts(&data, str);
663663
}
664664
break;
665665
}

drivers/net/ethernet/qlogic/qed/qed_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ int qed_fill_dev_info(struct qed_dev *cdev,
454454

455455
static void qed_free_cdev(struct qed_dev *cdev)
456456
{
457-
kfree((void *)cdev);
457+
kfree(cdev);
458458
}
459459

460460
static struct qed_dev *qed_alloc_cdev(struct pci_dev *pdev)

drivers/net/ethernet/qlogic/qed/qed_mcp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3301,7 +3301,9 @@ int qed_mcp_bist_nvm_get_num_images(struct qed_hwfn *p_hwfn,
33013301
if (rc)
33023302
return rc;
33033303

3304-
if (((rsp & FW_MSG_CODE_MASK) != FW_MSG_CODE_OK))
3304+
if (((rsp & FW_MSG_CODE_MASK) == FW_MSG_CODE_UNSUPPORTED))
3305+
rc = -EOPNOTSUPP;
3306+
else if (((rsp & FW_MSG_CODE_MASK) != FW_MSG_CODE_OK))
33053307
rc = -EINVAL;
33063308

33073309
return rc;
@@ -3356,6 +3358,7 @@ int qed_mcp_nvm_info_populate(struct qed_hwfn *p_hwfn)
33563358
p_ptt, &nvm_info.num_images);
33573359
if (rc == -EOPNOTSUPP) {
33583360
DP_INFO(p_hwfn, "DRV_MSG_CODE_BIST_TEST is not supported\n");
3361+
nvm_info.num_images = 0;
33593362
goto out;
33603363
} else if (rc || !nvm_info.num_images) {
33613364
DP_ERR(p_hwfn, "Failed getting number of images\n");

drivers/net/ethernet/qlogic/qed/qed_sriov.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,7 +3033,7 @@ static void qed_iov_vf_mbx_vport_update(struct qed_hwfn *p_hwfn,
30333033
u16 length;
30343034
int rc;
30353035

3036-
/* Valiate PF can send such a request */
3036+
/* Validate PF can send such a request */
30373037
if (!vf->vport_instance) {
30383038
DP_VERBOSE(p_hwfn,
30393039
QED_MSG_IOV,
@@ -3312,7 +3312,7 @@ static void qed_iov_vf_mbx_ucast_filter(struct qed_hwfn *p_hwfn,
33123312
goto out;
33133313
}
33143314

3315-
/* Determine if the unicast filtering is acceptible by PF */
3315+
/* Determine if the unicast filtering is acceptable by PF */
33163316
if ((p_bulletin->valid_bitmap & BIT(VLAN_ADDR_FORCED)) &&
33173317
(params.type == QED_FILTER_VLAN ||
33183318
params.type == QED_FILTER_MAC_VLAN)) {
@@ -3729,7 +3729,7 @@ qed_iov_execute_vf_flr_cleanup(struct qed_hwfn *p_hwfn,
37293729

37303730
rc = qed_iov_enable_vf_access(p_hwfn, p_ptt, p_vf);
37313731
if (rc) {
3732-
DP_ERR(p_hwfn, "Failed to re-enable VF[%d] acces\n",
3732+
DP_ERR(p_hwfn, "Failed to re-enable VF[%d] access\n",
37333733
vfid);
37343734
return rc;
37353735
}
@@ -4480,7 +4480,7 @@ int qed_sriov_disable(struct qed_dev *cdev, bool pci_enabled)
44804480
struct qed_ptt *ptt = qed_ptt_acquire(hwfn);
44814481

44824482
/* Failure to acquire the ptt in 100g creates an odd error
4483-
* where the first engine has already relased IOV.
4483+
* where the first engine has already released IOV.
44844484
*/
44854485
if (!ptt) {
44864486
DP_ERR(hwfn, "Failed to acquire ptt\n");

drivers/net/ethernet/qlogic/qede/qede_ethtool.c

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -272,28 +272,24 @@ static void qede_get_strings_stats_txq(struct qede_dev *edev,
272272
{
273273
int i;
274274

275-
for (i = 0; i < QEDE_NUM_TQSTATS; i++) {
275+
for (i = 0; i < QEDE_NUM_TQSTATS; i++)
276276
if (txq->is_xdp)
277-
sprintf(*buf, "%d [XDP]: %s",
278-
QEDE_TXQ_XDP_TO_IDX(edev, txq),
279-
qede_tqstats_arr[i].string);
277+
ethtool_sprintf(buf, "%d [XDP]: %s",
278+
QEDE_TXQ_XDP_TO_IDX(edev, txq),
279+
qede_tqstats_arr[i].string);
280280
else
281-
sprintf(*buf, "%d_%d: %s", txq->index, txq->cos,
282-
qede_tqstats_arr[i].string);
283-
*buf += ETH_GSTRING_LEN;
284-
}
281+
ethtool_sprintf(buf, "%d_%d: %s", txq->index, txq->cos,
282+
qede_tqstats_arr[i].string);
285283
}
286284

287285
static void qede_get_strings_stats_rxq(struct qede_dev *edev,
288286
struct qede_rx_queue *rxq, u8 **buf)
289287
{
290288
int i;
291289

292-
for (i = 0; i < QEDE_NUM_RQSTATS; i++) {
293-
sprintf(*buf, "%d: %s", rxq->rxq_id,
294-
qede_rqstats_arr[i].string);
295-
*buf += ETH_GSTRING_LEN;
296-
}
290+
for (i = 0; i < QEDE_NUM_RQSTATS; i++)
291+
ethtool_sprintf(buf, "%d: %s", rxq->rxq_id,
292+
qede_rqstats_arr[i].string);
297293
}
298294

299295
static bool qede_is_irrelevant_stat(struct qede_dev *edev, int stat_index)
@@ -331,26 +327,26 @@ static void qede_get_strings_stats(struct qede_dev *edev, u8 *buf)
331327
for (i = 0; i < QEDE_NUM_STATS; i++) {
332328
if (qede_is_irrelevant_stat(edev, i))
333329
continue;
334-
strcpy(buf, qede_stats_arr[i].string);
335-
buf += ETH_GSTRING_LEN;
330+
ethtool_puts(&buf, qede_stats_arr[i].string);
336331
}
337332
}
338333

339334
static void qede_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
340335
{
341336
struct qede_dev *edev = netdev_priv(dev);
337+
int i;
342338

343339
switch (stringset) {
344340
case ETH_SS_STATS:
345341
qede_get_strings_stats(edev, buf);
346342
break;
347343
case ETH_SS_PRIV_FLAGS:
348-
memcpy(buf, qede_private_arr,
349-
ETH_GSTRING_LEN * QEDE_PRI_FLAG_LEN);
344+
for (i = 0; i < QEDE_PRI_FLAG_LEN; i++)
345+
ethtool_puts(&buf, qede_private_arr[i]);
350346
break;
351347
case ETH_SS_TEST:
352-
memcpy(buf, qede_tests_str_arr,
353-
ETH_GSTRING_LEN * QEDE_ETHTOOL_TEST_MAX);
348+
for (i = 0; i < QEDE_ETHTOOL_TEST_MAX; i++)
349+
ethtool_puts(&buf, qede_tests_str_arr[i]);
354350
break;
355351
default:
356352
DP_VERBOSE(edev, QED_MSG_DEBUG,

drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,60 +1196,56 @@ qlcnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
11961196
{
11971197
struct qlcnic_adapter *adapter = netdev_priv(dev);
11981198
int index, i, num_stats;
1199+
const char *str;
11991200

12001201
switch (stringset) {
12011202
case ETH_SS_TEST:
1202-
memcpy(data, *qlcnic_gstrings_test,
1203-
QLCNIC_TEST_LEN * ETH_GSTRING_LEN);
1203+
for (i = 0; i < QLCNIC_TEST_LEN; i++)
1204+
ethtool_puts(&data, qlcnic_gstrings_test[i]);
12041205
break;
12051206
case ETH_SS_STATS:
12061207
num_stats = ARRAY_SIZE(qlcnic_tx_queue_stats_strings);
1207-
for (i = 0; i < adapter->drv_tx_rings; i++) {
1208+
for (i = 0; i < adapter->drv_tx_rings; i++)
12081209
for (index = 0; index < num_stats; index++) {
1209-
sprintf(data, "tx_queue_%d %s", i,
1210-
qlcnic_tx_queue_stats_strings[index]);
1211-
data += ETH_GSTRING_LEN;
1210+
str = qlcnic_tx_queue_stats_strings[index];
1211+
ethtool_sprintf(&data, "tx_queue_%d %s", i,
1212+
str);
12121213
}
1213-
}
12141214

1215-
for (index = 0; index < QLCNIC_STATS_LEN; index++) {
1216-
memcpy(data + index * ETH_GSTRING_LEN,
1217-
qlcnic_gstrings_stats[index].stat_string,
1218-
ETH_GSTRING_LEN);
1215+
for (i = 0; i < QLCNIC_STATS_LEN; i++) {
1216+
str = qlcnic_gstrings_stats[i].stat_string;
1217+
ethtool_puts(&data, str);
12191218
}
12201219

12211220
if (qlcnic_83xx_check(adapter)) {
12221221
num_stats = ARRAY_SIZE(qlcnic_83xx_tx_stats_strings);
1223-
for (i = 0; i < num_stats; i++, index++)
1224-
memcpy(data + index * ETH_GSTRING_LEN,
1225-
qlcnic_83xx_tx_stats_strings[i],
1226-
ETH_GSTRING_LEN);
1222+
for (i = 0; i < num_stats; i++) {
1223+
str = qlcnic_83xx_tx_stats_strings[i];
1224+
ethtool_puts(&data, str);
1225+
}
12271226
num_stats = ARRAY_SIZE(qlcnic_83xx_mac_stats_strings);
1228-
for (i = 0; i < num_stats; i++, index++)
1229-
memcpy(data + index * ETH_GSTRING_LEN,
1230-
qlcnic_83xx_mac_stats_strings[i],
1231-
ETH_GSTRING_LEN);
1227+
for (i = 0; i < num_stats; i++) {
1228+
str = qlcnic_83xx_mac_stats_strings[i];
1229+
ethtool_puts(&data, str);
1230+
}
12321231
num_stats = ARRAY_SIZE(qlcnic_83xx_rx_stats_strings);
1233-
for (i = 0; i < num_stats; i++, index++)
1234-
memcpy(data + index * ETH_GSTRING_LEN,
1235-
qlcnic_83xx_rx_stats_strings[i],
1236-
ETH_GSTRING_LEN);
1232+
for (i = 0; i < num_stats; i++) {
1233+
str = qlcnic_83xx_rx_stats_strings[i];
1234+
ethtool_puts(&data, str);
1235+
}
12371236
return;
12381237
} else {
12391238
num_stats = ARRAY_SIZE(qlcnic_83xx_mac_stats_strings);
1240-
for (i = 0; i < num_stats; i++, index++)
1241-
memcpy(data + index * ETH_GSTRING_LEN,
1242-
qlcnic_83xx_mac_stats_strings[i],
1243-
ETH_GSTRING_LEN);
1239+
for (i = 0; i < num_stats; i++) {
1240+
str = qlcnic_83xx_mac_stats_strings[i];
1241+
ethtool_puts(&data, str);
1242+
}
12441243
}
12451244
if (!(adapter->flags & QLCNIC_ESWITCH_ENABLED))
12461245
return;
12471246
num_stats = ARRAY_SIZE(qlcnic_device_gstrings_stats);
1248-
for (i = 0; i < num_stats; index++, i++) {
1249-
memcpy(data + index * ETH_GSTRING_LEN,
1250-
qlcnic_device_gstrings_stats[i],
1251-
ETH_GSTRING_LEN);
1252-
}
1247+
for (i = 0; i < num_stats; i++)
1248+
ethtool_puts(&data, qlcnic_device_gstrings_stats[i]);
12531249
}
12541250
}
12551251

drivers/scsi/3w-9xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2261,7 +2261,7 @@ static int __maybe_unused twa_resume(struct device *dev)
22612261
} /* End twa_resume() */
22622262

22632263
/* PCI Devices supported by this driver */
2264-
static struct pci_device_id twa_pci_tbl[] = {
2264+
static const struct pci_device_id twa_pci_tbl[] = {
22652265
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9000,
22662266
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
22672267
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX,

drivers/scsi/3w-sas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,7 @@ static int __maybe_unused twl_resume(struct device *dev)
18251825
} /* End twl_resume() */
18261826

18271827
/* PCI Devices supported by this driver */
1828-
static struct pci_device_id twl_pci_tbl[] = {
1828+
static const struct pci_device_id twl_pci_tbl[] = {
18291829
{ PCI_VDEVICE(3WARE, PCI_DEVICE_ID_3WARE_9750) },
18301830
{ }
18311831
};

drivers/scsi/3w-xxxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@ static void tw_remove(struct pci_dev *pdev)
23912391
} /* End tw_remove() */
23922392

23932393
/* PCI Devices supported by this driver */
2394-
static struct pci_device_id tw_pci_tbl[] = {
2394+
static const struct pci_device_id tw_pci_tbl[] = {
23952395
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_1000,
23962396
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
23972397
{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_7000,

drivers/scsi/BusLogic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3706,7 +3706,7 @@ static void __exit blogic_exit(void)
37063706
__setup("BusLogic=", blogic_setup);
37073707

37083708
#ifdef MODULE
3709-
/*static struct pci_device_id blogic_pci_tbl[] = {
3709+
/*static const struct pci_device_id blogic_pci_tbl[] = {
37103710
{ PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER,
37113711
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
37123712
{ PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC,

0 commit comments

Comments
 (0)