MFC r322306:

Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.
Useful for debugging.

Approved by:		re (marius, gjb)
Submitted by:		Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2017-08-14 13:42:36 +00:00
parent a5fe5b19f6
commit 36ab4a4a31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=322507

View File

@ -1772,7 +1772,8 @@ static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
(unsigned)dev->if_mtu, (unsigned)new_mtu);
if ((new_mtu < MLX4_EN_MIN_MTU) || (new_mtu > priv->max_mtu)) {
en_err(priv, "Bad MTU size:%d.\n", new_mtu);
en_err(priv, "Bad MTU size:%d, max %u.\n", new_mtu,
priv->max_mtu);
return -EPERM;
}
mutex_lock(&mdev->state_lock);