This patch ensures that output drivers are off prior to sampling data from the
scl and sda lines on the i2c bus.

Signed-off-by: Jean-Hugues Deschenes <jean-hugues.desche...@octasic.com>
Index: igb-5.2.9.4-ori/src/igb_main.c
===================================================================
--- igb-5.2.9.4-ori.orig/src/igb_main.c 2014-08-04 18:19:04.000000000 -0400
+++ igb-5.2.9.4-ori/src/igb_main.c      2014-11-26 13:16:44.360050188 -0500
@@ -1634,6 +1634,13 @@
        struct e1000_hw *hw = &adapter->hw;
        s32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
 
+       i2cctl |= E1000_I2C_DATA_OE_N;
+
+       E1000_WRITE_REG(hw, E1000_I2CPARAMS, i2cctl);
+       E1000_WRITE_FLUSH(hw);
+
+       i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+
        return !!(i2cctl & E1000_I2C_DATA_IN);
 }
 
@@ -1696,6 +1703,13 @@
        struct e1000_hw *hw = &adapter->hw;
        s32 i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
 
+       i2cctl |= E1000_I2C_CLK_OE_N;
+
+       E1000_WRITE_REG(hw, E1000_I2CPARAMS, i2cctl);
+       E1000_WRITE_FLUSH(hw);
+
+       i2cctl = E1000_READ_REG(hw, E1000_I2CPARAMS);
+
        return !!(i2cctl & E1000_I2C_CLK_IN);
 }
 


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to