Commit b5b86a4d authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

Staging: et131x: fix | vs & typos

These two places seem like they should be using bitwise OR instead of
bitwise AND.  The first one is a noop which is equivalent to:

	imr |= (0x0100 & 0x0004 & 0x0001);

The second is sets lcr2 to zero instead of just clearing the high bits.

	lcr2 &= (0x00F0 & 0x000F);
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 397d3e60
...@@ -1766,8 +1766,8 @@ static void et131x_xcvr_init(struct et131x_adapter *adapter) ...@@ -1766,8 +1766,8 @@ static void et131x_xcvr_init(struct et131x_adapter *adapter)
/* Set the link status interrupt only. Bad behavior when link status /* Set the link status interrupt only. Bad behavior when link status
* and auto neg are set, we run into a nested interrupt problem * and auto neg are set, we run into a nested interrupt problem
*/ */
imr |= (ET_PHY_INT_MASK_AUTONEGSTAT & imr |= (ET_PHY_INT_MASK_AUTONEGSTAT |
ET_PHY_INT_MASK_LINKSTAT & ET_PHY_INT_MASK_LINKSTAT |
ET_PHY_INT_MASK_ENABLE); ET_PHY_INT_MASK_ENABLE);
et131x_mii_write(adapter, PHY_INTERRUPT_MASK, imr); et131x_mii_write(adapter, PHY_INTERRUPT_MASK, imr);
...@@ -1783,7 +1783,7 @@ static void et131x_xcvr_init(struct et131x_adapter *adapter) ...@@ -1783,7 +1783,7 @@ static void et131x_xcvr_init(struct et131x_adapter *adapter)
if ((adapter->eeprom_data[1] & 0x4) == 0) { if ((adapter->eeprom_data[1] & 0x4) == 0) {
et131x_mii_read(adapter, PHY_LED_2, &lcr2); et131x_mii_read(adapter, PHY_LED_2, &lcr2);
lcr2 &= (ET_LED2_LED_100TX & ET_LED2_LED_1000T); lcr2 &= (ET_LED2_LED_100TX | ET_LED2_LED_1000T);
lcr2 |= (LED_VAL_LINKON_ACTIVE << LED_LINK_SHIFT); lcr2 |= (LED_VAL_LINKON_ACTIVE << LED_LINK_SHIFT);
if ((adapter->eeprom_data[1] & 0x8) == 0) if ((adapter->eeprom_data[1] & 0x8) == 0)
......
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