  }
  
  static int ixp4xx_bit_getscl(void *data)
-@@ -127,17 +137,26 @@ static int ixp4xx_i2c_probe(struct devic
+@@ -65,7 +75,17 @@ static int ixp4xx_bit_getscl(void *data)
+ 
+ 	gpio_line_config(ixp4xx_scl_pin(data), IXP4XX_GPIO_IN );
+ 	gpio_line_get(ixp4xx_scl_pin(data), &scl);
+-
++#ifdef CONFIG_MACH_NAS100D
++	{
++		int i;
++		for (i = 0; i <= 0x0f; i++)
++		{
++			gpio_line_get(ixp4xx_scl_pin(data), &scl);
++			if (scl == 0)
++				break;
++		}
++	}
++#endif
+ 	return scl;
+ }	
+ 
+@@ -76,6 +96,17 @@ static int ixp4xx_bit_getsda(void *data)
+ 	gpio_line_config(ixp4xx_sda_pin(data), IXP4XX_GPIO_IN );
+ 	gpio_line_get(ixp4xx_sda_pin(data), &sda);
+ 
++#ifdef CONFIG_MACH_NAS100D
++	{
++		int i;
++		for (i = 0; i <= 0x0f; i++)
++		{
++			gpio_line_get(ixp4xx_sda_pin(data), &sda);
++			if (sda == 0)
++				break;
++		}
++	}
++#endif
+ 	return sda;
+ }	
+ 
+@@ -127,17 +158,27 @@ static int ixp4xx_i2c_probe(struct devic
  	drv_data->algo_data.udelay = 10;
  	drv_data->algo_data.mdelay = 10;
  	drv_data->algo_data.timeout = 100;
 -
 +#ifdef CONFIG_MACH_NAS100D
-+	drv_data->algo_data.udelay = 100;
-+	drv_data->algo_data.mdelay = 100;
++	drv_data->algo_data.getscl = NULL;
++	drv_data->algo_data.udelay = 120;
++	drv_data->algo_data.mdelay = 120;
 +#endif
  	drv_data->adapter.id = I2C_HW_B_IXP4XX;
  	drv_data->adapter.algo_data = &drv_data->algo_data;

 	if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) {
 		printk(KERN_ERR "ERROR: Could not install %s\n", dev->bus_id);
 

 drivers/i2c/algos/i2c-algo-bit.c |   24 +++++++++++++++++++
 drivers/i2c/busses/i2c-ixp4xx.c  |   47 ++++++++++++++++++++++++++++++++++++---
 2 files changed, 67 insertions(+), 4 deletions(-)

--- linux-nas100d.orig/drivers/i2c/busses/i2c-ixp4xx.c	2005-11-11 22:22:43.000000000 +0100
+++ linux-nas100d/drivers/i2c/busses/i2c-ixp4xx.c	2005-11-14 17:06:04.000000000 +0100
@@ -47,16 +47,26 @@ static inline int ixp4xx_sda_pin(void *d
 
 static void ixp4xx_bit_setscl(void *data, int val)
