pkgdep/git: Patch for the ice driver targeting latest linux kernel

These changes are needed for the 5.15.x kernel that's currently being
shipped with fedora35.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7e79bff77a93f81bd93376b84f4ef7f7230cc322
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10610
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Michal Berger 2021-12-09 13:54:59 +01:00 committed by Tomasz Zawadzki
parent d6d75fca2d
commit bf815486fc
2 changed files with 92 additions and 0 deletions

View File

@ -489,6 +489,11 @@ function install_ice() {
patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1
fi < "$rootdir/test/common/config/pkgdep/patches/ice/0001-undef-skb-frag-off.patch"
fi
if ge "$(< /proc/sys/kernel/osrelease)" 5.15.0; then
patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1
fi < "$rootdir/test/common/config/pkgdep/patches/ice/0001-devlink.patch"
(
cd "$GIT_REPOS/ice-$ICE_VERSION/src"
sudo make -j"$(nproc)" install

View File

@ -0,0 +1,87 @@
Various fixes addressing changes in recent linux kernels. Mainly:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d7907a2b1a3b89bea136025f885035a083525e41
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=919d13a7e455c2e7676042d7a5f94c164e859d8a
---
src/ice_devlink.c | 4 ++--
src/ice_ethtool.c | 8 ++++----
src/ice_repr.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/ice_devlink.c b/src/ice_devlink.c
index 8b7fcbc..61d6134 100644
--- a/src/ice_devlink.c
+++ b/src/ice_devlink.c
@@ -713,7 +713,7 @@ struct ice_pf *ice_allocate_pf(struct device *dev)
{
struct devlink *devlink;
- devlink = devlink_alloc(&ice_devlink_ops, sizeof(struct ice_pf));
+ devlink = devlink_alloc(&ice_devlink_ops, sizeof(struct ice_pf), dev);
if (!devlink)
return NULL;
@@ -740,7 +740,7 @@ int ice_devlink_register(struct ice_pf *pf)
struct device *dev = ice_pf_to_dev(pf);
int err;
- err = devlink_register(devlink, dev);
+ err = devlink_register(devlink);
if (err) {
dev_err(dev, "devlink registration failed: %d\n", err);
return err;
diff --git a/src/ice_ethtool.c b/src/ice_ethtool.c
index 6ac736f..bd21d74 100644
--- a/src/ice_ethtool.c
+++ b/src/ice_ethtool.c
@@ -5451,7 +5451,7 @@ __ice_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec,
}
static int
-ice_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
+ice_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)
{
return __ice_get_coalesce(netdev, ec, -1);
}
@@ -5704,7 +5704,7 @@ set_complete:
}
static int
-ice_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
+ice_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)
{
return __ice_set_coalesce(netdev, ec, -1);
}
@@ -5755,7 +5755,7 @@ ice_repr_is_coalesce_param_invalid(struct ethtool_coalesce *ec)
* Return 0 on success, negative otherwise.
*/
static int
-ice_repr_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
+ice_repr_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)
{
struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_vsi *vsi = np->vsi;
@@ -5796,7 +5796,7 @@ ice_repr_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
* Return 0 on success, negative otherwise.
*/
static int
-ice_repr_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
+ice_repr_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)
{
struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_vsi *vsi = np->vsi;
diff --git a/src/ice_repr.c b/src/ice_repr.c
index 0f4d9b6..0e52b14 100644
--- a/src/ice_repr.c
+++ b/src/ice_repr.c
@@ -34,7 +34,7 @@ ice_repr_get_phys_port_name(struct net_device *netdev, char *buf, size_t len)
#if IS_ENABLED(CONFIG_NET_DEVLINK)
/* Devlink port is registered and devlink core is taking care of name formatting. */
- if (repr->vf->devlink_port.registered)
+ if (repr->vf->devlink_port.devlink)
return -EOPNOTSUPP;
#endif /* CONFIG_NET_DEVLINK */
---