diff options
author | Hamish Martin <hamish.martin@alliedtelesis.co.nz> | 2023-10-25 16:55:13 +1300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-11-21 09:30:22 +0100 |
commit | 02a46753601a24e1673d9c28173121055e8e6cc9 (patch) | |
tree | a7ccdb8db2f8bbdbf771a279de3847d5c003eed4 /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | d9786159d229cdc1f579f7cf3abf464efb453e40 (diff) |
HID: mcp2221: Don't set bus speed on every transfer
Since the initial commit of this driver the I2C bus speed has been
reconfigured for every single transfer. This is despite the fact that we
never change the speed and it is never "lost" by the chip.
Upon investigation we find that what was really happening was that the
setting of the bus speed had the side effect of cancelling a previous
failed command if there was one, thereby freeing the bus. This is the
part that was actually required to keep the bus operational in the face
of failed commands.
Instead of always setting the speed, we now correctly cancel any failed
commands as they are detected. This means we can just set the bus speed
at probe time and remove the previous speed sets on each transfer.
This has the effect of improving performance and reducing the number of
commands required to complete transfers.
Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions