Back out PX4 fixes that were reverted in PX4 repository
This commit is contained in:
parent
5d3479bbec
commit
c68f9477cf
@ -1632,14 +1632,7 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
||||
|
||||
stm32_i2c_clrstart(priv);
|
||||
|
||||
/* Old transfers are done
|
||||
*
|
||||
* Reset ptr and dcnt to ensure an unexpected data interrupt doesn't
|
||||
* overwrite stale data.
|
||||
*/
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
/* Old transfers are done */
|
||||
|
||||
priv->msgv = msgs;
|
||||
priv->msgc = count;
|
||||
@ -1776,11 +1769,6 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
||||
stm32_i2c_enablefsmc(ahbenr);
|
||||
stm32_i2c_sem_post(dev);
|
||||
|
||||
/* Ensure that any ISR happening after we finish can't overwrite any user data */
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
|
||||
return -errval;
|
||||
}
|
||||
|
||||
|
@ -2134,14 +2134,7 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
||||
|
||||
stm32_i2c_clrstart(priv);
|
||||
|
||||
/* Old transfers are done
|
||||
*
|
||||
* Reset ptr and dcnt to ensure an unexpected data interrupt doesn't
|
||||
* overwrite stale data.
|
||||
*/
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
/* Old transfers are done */
|
||||
|
||||
priv->msgv = msgs;
|
||||
priv->msgc = count;
|
||||
@ -2304,11 +2297,6 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
||||
stm32_i2c_enablefsmc(ahbenr);
|
||||
stm32_i2c_sem_post(dev);
|
||||
|
||||
/* Ensure that any ISR happening after we finish can't overwrite any user data */
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
|
||||
return -errval;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user