Skip to content

Commit

Permalink
enic: bug fix: check for zero port MTU before posting warning
Browse files Browse the repository at this point in the history
Nic firmware can return zero for port MTU, so check for non-zero value
before checking for change in port MTU.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Feldman authored and David S. Miller committed Sep 4, 2009
1 parent d73149f commit 491598a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static void enic_mtu_check(struct enic *enic)
{
u32 mtu = vnic_dev_mtu(enic->vdev);

if (mtu != enic->port_mtu) {
if (mtu && mtu != enic->port_mtu) {
if (mtu < enic->netdev->mtu)
printk(KERN_WARNING PFX
"%s: interface MTU (%d) set higher "
Expand Down

0 comments on commit 491598a

Please sign in to comment.