Skip to content

Commit 2d2632d

Browse files
committed
Merge: igbvf: Driver Update
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4087 JIRA: https://issues.redhat.com/browse/RHEL-17488 Tested: Basic functionality. No functional changes in this patchset. Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Jesse Brandeburg (3): intel: add bit macro includes where needed intel: legacy: field get conversion net: intel: implement modern PM ops declarations Eric Dumazet (1): net: adopt skb_network_offset() and similar helpers drivers/net/ethernet/intel/igbvf/mbx.c | 1 + drivers/net/ethernet/intel/igbvf/netdev.c | 41 +++++++++++------------ 2 files changed, 21 insertions(+), 21 deletions(-) Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Michal Schmidt <mschmidt@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents ac6f6b7 + 6b69f8a commit 2d2632d

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

drivers/net/ethernet/intel/igbvf/mbx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright(c) 2009 - 2018 Intel Corporation. */
33

4+
#include <linux/bitfield.h>
45
#include "mbx.h"
56

67
/**

drivers/net/ethernet/intel/igbvf/netdev.c

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33

44
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
55

6-
#include <linux/module.h>
7-
#include <linux/types.h>
8-
#include <linux/init.h>
9-
#include <linux/pci.h>
10-
#include <linux/vmalloc.h>
11-
#include <linux/pagemap.h>
6+
#include <linux/bitfield.h>
127
#include <linux/delay.h>
13-
#include <linux/netdevice.h>
14-
#include <linux/tcp.h>
15-
#include <linux/ipv6.h>
16-
#include <linux/slab.h>
17-
#include <net/checksum.h>
18-
#include <net/ip6_checksum.h>
19-
#include <linux/mii.h>
208
#include <linux/ethtool.h>
219
#include <linux/if_vlan.h>
10+
#include <linux/init.h>
11+
#include <linux/ipv6.h>
12+
#include <linux/mii.h>
13+
#include <linux/module.h>
14+
#include <linux/netdevice.h>
15+
#include <linux/pagemap.h>
16+
#include <linux/pci.h>
2217
#include <linux/prefetch.h>
2318
#include <linux/sctp.h>
24-
19+
#include <linux/slab.h>
20+
#include <linux/tcp.h>
21+
#include <linux/types.h>
22+
#include <linux/vmalloc.h>
23+
#include <net/checksum.h>
24+
#include <net/ip6_checksum.h>
2525
#include "igbvf.h"
2626

2727
char igbvf_driver_name[] = "igbvf";
@@ -273,9 +273,8 @@ static bool igbvf_clean_rx_irq(struct igbvf_adapter *adapter,
273273
* that case, it fills the header buffer and spills the rest
274274
* into the page.
275275
*/
276-
hlen = (le16_to_cpu(rx_desc->wb.lower.lo_dword.hs_rss.hdr_info)
277-
& E1000_RXDADV_HDRBUFLEN_MASK) >>
278-
E1000_RXDADV_HDRBUFLEN_SHIFT;
276+
hlen = le16_get_bits(rx_desc->wb.lower.lo_dword.hs_rss.hdr_info,
277+
E1000_RXDADV_HDRBUFLEN_MASK);
279278
if (hlen > adapter->rx_ps_hdr_size)
280279
hlen = adapter->rx_ps_hdr_size;
281280

@@ -2471,7 +2470,7 @@ static int igbvf_suspend(struct device *dev_d)
24712470
return 0;
24722471
}
24732472

2474-
static int __maybe_unused igbvf_resume(struct device *dev_d)
2473+
static int igbvf_resume(struct device *dev_d)
24752474
{
24762475
struct pci_dev *pdev = to_pci_dev(dev_d);
24772476
struct net_device *netdev = pci_get_drvdata(pdev);
@@ -2656,7 +2655,7 @@ igbvf_features_check(struct sk_buff *skb, struct net_device *dev,
26562655
unsigned int network_hdr_len, mac_hdr_len;
26572656

26582657
/* Make certain the headers can be described by a context descriptor */
2659-
mac_hdr_len = skb_network_header(skb) - skb->data;
2658+
mac_hdr_len = skb_network_offset(skb);
26602659
if (unlikely(mac_hdr_len > IGBVF_MAX_MAC_HDR_LEN))
26612660
return features & ~(NETIF_F_HW_CSUM |
26622661
NETIF_F_SCTP_CRC |
@@ -2958,15 +2957,15 @@ static const struct pci_device_id igbvf_pci_tbl[] = {
29582957
};
29592958
MODULE_DEVICE_TABLE(pci, igbvf_pci_tbl);
29602959

2961-
static SIMPLE_DEV_PM_OPS(igbvf_pm_ops, igbvf_suspend, igbvf_resume);
2960+
static DEFINE_SIMPLE_DEV_PM_OPS(igbvf_pm_ops, igbvf_suspend, igbvf_resume);
29622961

29632962
/* PCI Device API Driver */
29642963
static struct pci_driver igbvf_driver = {
29652964
.name = igbvf_driver_name,
29662965
.id_table = igbvf_pci_tbl,
29672966
.probe = igbvf_probe,
29682967
.remove = igbvf_remove,
2969-
.driver.pm = &igbvf_pm_ops,
2968+
.driver.pm = pm_sleep_ptr(&igbvf_pm_ops),
29702969
.shutdown = igbvf_shutdown,
29712970
.err_handler = &igbvf_err_handler
29722971
};

0 commit comments

Comments
 (0)