enic: bug fix: check for zero port MTU before posting warning
authorScott Feldman <scofeldm@cisco.com>
Thu, 3 Sep 2009 17:02:40 +0000 (17:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Sep 2009 03:19:24 +0000 (20:19 -0700)
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>
drivers/net/enic/enic_main.c

index e0bf224d7f9b2c6b3bd8c3707175057d32f66193..f800218c6595db9f23bf8ff9eb3d63d69df6de96 100644 (file)
@@ -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 "