aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>2009-07-16 11:50:32 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-17 12:47:35 -0400
commit078788b6a68828c1caf395b48110535e051cd623 (patch)
tree9b2f1cef5a6d0c0d8d3653cd8d8f77e5d0401fc9 /drivers
parentf4ec443b2b27ecb401eee35a7bea330438556c7e (diff)
ixgbe: Make sure boolean assignments from bitwise operations done correctly
When the link comes up, the driver detects which flow control settings are active. This is done using bitwise operations directly from the hardware registers, and assumes the proper boolean assignment. Make this an explicit boolean value before assignment to the bool. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index e3442f47f93..09394c14ee5 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4643,13 +4643,13 @@ static void ixgbe_watchdog_task(struct work_struct *work)
4643 if (hw->mac.type == ixgbe_mac_82599EB) { 4643 if (hw->mac.type == ixgbe_mac_82599EB) {
4644 u32 mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN); 4644 u32 mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN);
4645 u32 fccfg = IXGBE_READ_REG(hw, IXGBE_FCCFG); 4645 u32 fccfg = IXGBE_READ_REG(hw, IXGBE_FCCFG);
4646 flow_rx = (mflcn & IXGBE_MFLCN_RFCE); 4646 flow_rx = !!(mflcn & IXGBE_MFLCN_RFCE);
4647 flow_tx = (fccfg & IXGBE_FCCFG_TFCE_802_3X); 4647 flow_tx = !!(fccfg & IXGBE_FCCFG_TFCE_802_3X);
4648 } else { 4648 } else {
4649 u32 frctl = IXGBE_READ_REG(hw, IXGBE_FCTRL); 4649 u32 frctl = IXGBE_READ_REG(hw, IXGBE_FCTRL);
4650 u32 rmcs = IXGBE_READ_REG(hw, IXGBE_RMCS); 4650 u32 rmcs = IXGBE_READ_REG(hw, IXGBE_RMCS);
4651 flow_rx = (frctl & IXGBE_FCTRL_RFCE); 4651 flow_rx = !!(frctl & IXGBE_FCTRL_RFCE);
4652 flow_tx = (rmcs & IXGBE_RMCS_TFCE_802_3X); 4652 flow_tx = !!(rmcs & IXGBE_RMCS_TFCE_802_3X);
4653 } 4653 }
4654 4654
4655 printk(KERN_INFO "ixgbe: %s NIC Link is Up %s, " 4655 printk(KERN_INFO "ixgbe: %s NIC Link is Up %s, "