i2c-ismt: add Initialize DMA buffer code ismt_access()
Subsystems (2)
PATCH 1/1 i2c-ismt: add Initialize DMA buffer code ismt_access()
This patch adds code to Initialize the DMA buffer to compensate for possible hardware data corruption.
--- drivers/i2c/busses/i2c-ismt.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/i2c/busses/i2c-ismt.c +3 -0
@@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr, desc = &priv->hw[priv->head]; +/* Initialize the DMA buffer */ +memset (priv->dma_buffer,0 , (I2C_SMBUS_BLOCK_MAX +1 )); +/* Initialize the descriptor */ memset (desc,0 ,sizeof (struct ismt_desc )); desc->tgtaddr_rw =ISMT_DESC_ADDR_RW (addr, read_write);
Signature · 1 line
1.7.7.6
Quoted 1 line · James Ralston
This patch adds code to Initialize the DMA buffer to compensate for possible hardware data corruption.
Take care of the line width here.
Quoted 10 lines
Signed-off-by James Ralston <[email protected]>--- drivers/i2c/busses/i2c-ismt.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/i2c/busses/i2c-ismt.c +0
-0
drivers/i2c/busses/i2c-ismt.c static int ismt_access(struct i2c_adapter *adap, u16 addr, · line 397
Quoted 5 lines
drivers/i2c/busses/i2c-ismt.c +2
-0@@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr, desc = &priv->hw[priv->head]; +/* Initialize the DMA buffer */ +memset (priv->dma_buffer,0 , (I2C_SMBUS_BLOCK_MAX +1 ));
sizeof()?
Quoted 7 lines
drivers/i2c/busses/i2c-ismt.c +1
-0+/* Initialize the descriptor */ memset (desc,0 ,sizeof (struct ismt_desc )); desc->tgtaddr_rw =ISMT_DESC_ADDR_RW (addr, read_write);Signature · 1 line
1.7.7.6
Neil Horman
maintainerQuoted 16 lines · Wolfram Sang
Quoted 1 line · James Ralston
This patch adds code to Initialize the DMA buffer to compensate for possible hardware data corruption.
Take care of the line width here.
Quoted 11 lines
Signed-off-by James Ralston <[email protected]>--- drivers/i2c/busses/i2c-ismt.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/i2c/busses/i2c-ismt.c +0
-0@@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
Quoted 7 lines
drivers/i2c/busses/i2c-ismt.c static int ismt_access(struct i2c_adapter *adap, u16 addr, · line 397
Quoted 4 lines
drivers/i2c/busses/i2c-ismt.c +2
-0desc = &priv->hw[priv->head]; +/* Initialize the DMA buffer */ +memset (priv->dma_buffer,0 , (I2C_SMBUS_BLOCK_MAX +1 ));
sizeof()?
Agreed.
Neil
Quoted 7 lines
Quoted 7 lines
drivers/i2c/busses/i2c-ismt.c +1
-0+/* Initialize the descriptor */ memset (desc,0 ,sizeof (struct ismt_desc )); desc->tgtaddr_rw =ISMT_DESC_ADDR_RW (addr, read_write);Signature · 1 line
1.7.7.6
Quoted 17 lines · Neil Horman
Quoted 16 lines · Wolfram Sang
Quoted 1 line · James Ralston
This patch adds code to Initialize the DMA buffer to compensate for possible hardware data corruption.
Take care of the line width here.
Quoted 11 lines
Signed-off-by James Ralston <[email protected]>--- drivers/i2c/busses/i2c-ismt.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/i2c/busses/i2c-ismt.c +0
-0@@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
Quoted 8 lines
Quoted 7 lines
drivers/i2c/busses/i2c-ismt.c static int ismt_access(struct i2c_adapter *adap, u16 addr, · line 397
Quoted 4 lines
drivers/i2c/busses/i2c-ismt.c +2
-0desc = &priv->hw[priv->head]; +/* Initialize the DMA buffer */ +memset (priv->dma_buffer,0 , (I2C_SMBUS_BLOCK_MAX +1 ));
sizeof()?Agreed.
Fixed that myself so it can be in my pull-request to Linus today.