Commit 491598a4 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller

enic: bug fix: check for zero port MTU before posting warning

Nic firmware can return zero for port MTU, so check for non-zero value
before checking for change in port MTU.
Signed-off-by: default avatarScott Feldman <scofeldm@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d73149f5
...@@ -362,7 +362,7 @@ static void enic_mtu_check(struct enic *enic) ...@@ -362,7 +362,7 @@ static void enic_mtu_check(struct enic *enic)
{ {
u32 mtu = vnic_dev_mtu(enic->vdev); u32 mtu = vnic_dev_mtu(enic->vdev);
if (mtu != enic->port_mtu) { if (mtu && mtu != enic->port_mtu) {
if (mtu < enic->netdev->mtu) if (mtu < enic->netdev->mtu)
printk(KERN_WARNING PFX printk(KERN_WARNING PFX
"%s: interface MTU (%d) set higher " "%s: interface MTU (%d) set higher "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment