Skip to content

Commit c9b9b92

Browse files
committed
Merge: bnx2x: driver update to v6.12
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5758 JIRA: https://issues.redhat.com/browse/RHEL-52258 JIRA: https://issues.redhat.com/browse/RHEL-52667 No new features. Cleanups and code fixes. Note that commit 26f7415 ("bnx2x: Remove setting of RX software timestamp") is not included here, but in !5657. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Chris von Recklinghausen <crecklin@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents 0c5e52c + 32d88cd commit c9b9b92

File tree

8 files changed

+18
-19
lines changed

8 files changed

+18
-19
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ enum {
12621262

12631263
struct bnx2x_fw_stats_req {
12641264
struct stats_query_header hdr;
1265-
struct stats_query_entry query[FP_SB_MAX_E1x+
1265+
struct stats_query_entry query[FP_SB_MAX_E2 +
12661266
BNX2X_FIRST_QUEUE_QUERY_IDX];
12671267
};
12681268

@@ -2003,7 +2003,7 @@ int bnx2x_idle_chk(struct bnx2x *bp);
20032003
* operation has been successfully scheduled and a negative - if a requested
20042004
* operations has failed.
20052005
*/
2006-
int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac,
2006+
int bnx2x_set_mac_one(struct bnx2x *bp, const u8 *mac,
20072007
struct bnx2x_vlan_mac_obj *obj, bool set,
20082008
int mac_type, unsigned long *ramrod_flags);
20092009

drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3538,7 +3538,7 @@ static u8 bnx2x_set_pbd_csum_enc(struct bnx2x *bp, struct sk_buff *skb,
35383538
u32 *parsing_data, u32 xmit_type)
35393539
{
35403540
*parsing_data |=
3541-
((((u8 *)skb_inner_transport_header(skb) - skb->data) >> 1) <<
3541+
((skb_inner_transport_offset(skb) >> 1) <<
35423542
ETH_TX_PARSE_BD_E2_L4_HDR_START_OFFSET_W_SHIFT) &
35433543
ETH_TX_PARSE_BD_E2_L4_HDR_START_OFFSET_W;
35443544

@@ -3570,7 +3570,7 @@ static u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb,
35703570
u32 *parsing_data, u32 xmit_type)
35713571
{
35723572
*parsing_data |=
3573-
((((u8 *)skb_transport_header(skb) - skb->data) >> 1) <<
3573+
((skb_transport_offset(skb) >> 1) <<
35743574
ETH_TX_PARSE_BD_E2_L4_HDR_START_OFFSET_W_SHIFT) &
35753575
ETH_TX_PARSE_BD_E2_L4_HDR_START_OFFSET_W;
35763576

@@ -3613,16 +3613,15 @@ static u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb,
36133613
struct eth_tx_parse_bd_e1x *pbd,
36143614
u32 xmit_type)
36153615
{
3616-
u8 hlen = (skb_network_header(skb) - skb->data) >> 1;
3616+
u8 hlen = skb_network_offset(skb) >> 1;
36173617

36183618
/* for now NS flag is not used in Linux */
36193619
pbd->global_data =
36203620
cpu_to_le16(hlen |
36213621
((skb->protocol == cpu_to_be16(ETH_P_8021Q)) <<
36223622
ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT));
36233623

3624-
pbd->ip_hlen_w = (skb_transport_header(skb) -
3625-
skb_network_header(skb)) >> 1;
3624+
pbd->ip_hlen_w = skb_network_header_len(skb) >> 1;
36263625

36273626
hlen += pbd->ip_hlen_w;
36283627

@@ -3667,8 +3666,7 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb,
36673666
u8 outerip_off, outerip_len = 0;
36683667

36693668
/* from outer IP to transport */
3670-
hlen_w = (skb_inner_transport_header(skb) -
3671-
skb_network_header(skb)) >> 1;
3669+
hlen_w = skb_inner_transport_offset(skb) >> 1;
36723670

36733671
/* transport len */
36743672
hlen_w += inner_tcp_hdrlen(skb) >> 1;
@@ -3714,7 +3712,7 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb,
37143712
0, IPPROTO_TCP, 0));
37153713
}
37163714

3717-
outerip_off = (skb_network_header(skb) - skb->data) >> 1;
3715+
outerip_off = (skb_network_offset(skb)) >> 1;
37183716

37193717
*global_data |=
37203718
outerip_off |
@@ -4352,7 +4350,7 @@ int bnx2x_change_mac_addr(struct net_device *dev, void *p)
43524350
return rc;
43534351
}
43544352

4355-
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
4353+
eth_hw_addr_set(dev, addr->sa_data);
43564354

43574355
if (netif_running(dev))
43584356
rc = bnx2x_set_eth_mac(bp, true);

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8427,7 +8427,7 @@ int bnx2x_alloc_mem(struct bnx2x *bp)
84278427
* Init service functions
84288428
*/
84298429

8430-
int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac,
8430+
int bnx2x_set_mac_one(struct bnx2x *bp, const u8 *mac,
84318431
struct bnx2x_vlan_mac_obj *obj, bool set,
84328432
int mac_type, unsigned long *ramrod_flags)
84338433
{
@@ -9156,7 +9156,7 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
91569156

91579157
else if (bp->wol) {
91589158
u32 emac_base = port ? GRCBASE_EMAC1 : GRCBASE_EMAC0;
9159-
u8 *mac_addr = bp->dev->dev_addr;
9159+
const u8 *mac_addr = bp->dev->dev_addr;
91609160
struct pci_dev *pdev = bp->pdev;
91619161
u32 val;
91629162
u16 pmc;

drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,8 @@
868868
#define DORQ_REG_VF_TYPE_VALUE_0 0x170258
869869
#define DORQ_REG_VF_USAGE_CT_LIMIT 0x170340
870870

871+
extern const u32 dmae_reg_go_c[];
872+
871873
/* [RW 4] Initial activity counter value on the load request; when the
872874
shortcut is done. */
873875
#define DORQ_REG_SHRT_ACT_CNT 0x170070

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2652,10 +2652,10 @@ int bnx2x_get_vf_config(struct net_device *dev, int vfidx,
26522652
/* vlan */
26532653
if (bulletin->valid_bitmap & (1 << VLAN_VALID))
26542654
/* vlan configured by ndo so its in bulletin board */
2655-
memcpy(&ivi->vlan, &bulletin->vlan, VLAN_HLEN);
2655+
ivi->vlan = bulletin->vlan;
26562656
else
26572657
/* function has not been loaded yet. Show vlans as 0s */
2658-
memset(&ivi->vlan, 0, VLAN_HLEN);
2658+
ivi->vlan = 0;
26592659

26602660
mutex_unlock(&bp->vfdb->bulletin_mutex);
26612661
}

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ int bnx2x_vfpf_init(struct bnx2x *bp);
508508
void bnx2x_vfpf_close_vf(struct bnx2x *bp);
509509
int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp,
510510
bool is_leading);
511-
int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, u8 vf_qid, bool set);
511+
int bnx2x_vfpf_config_mac(struct bnx2x *bp, const u8 *addr, u8 vf_qid,
512+
bool set);
512513
int bnx2x_vfpf_config_rss(struct bnx2x *bp,
513514
struct bnx2x_config_rss_params *params);
514515
int bnx2x_vfpf_set_mcast(struct net_device *dev);

drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include "bnx2x_cmn.h"
2424
#include "bnx2x_sriov.h"
2525

26-
extern const u32 dmae_reg_go_c[];
27-
2826
/* Statistics */
2927

3028
/*

drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ static int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx)
724724
}
725725

726726
/* request pf to add a mac for the vf */
727-
int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, u8 vf_qid, bool set)
727+
int bnx2x_vfpf_config_mac(struct bnx2x *bp, const u8 *addr, u8 vf_qid, bool set)
728728
{
729729
struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters;
730730
struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp;

0 commit comments

Comments
 (0)