aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorAlex Williams <[email protected]>2019-01-31 13:39:57 -0800
committerWolfram Sang <[email protected]>2020-01-30 09:01:27 +0100
commitbbf967b223b3f1b55eb494d735226152afbad64e (patch)
tree1530a3b802467b5aa8723d3c518bbbad854bf543 /drivers/usb/cdns3/cdns3-debug.h
parentf53938d2c79ae3c768dc92b1c3d898dfe820a491 (diff)
i2c: cadence: Handle transfer_size rollover
Under certain conditions, Cadence's I2C controller's transfer_size register will roll over and generate invalid read transactions. Before this change, the ISR relied solely on the RXDV bit to determine when to write more data to the user's buffer. The invalid read data would cause overruns, smashing stacks and worse. This change stops the buffer writes to the requested boundary and reports the error. The controller will be reset so normal transactions may resume. Signed-off-by: Alex Williams <[email protected]> Reviewed-by: Shubhrajyoti Datta <[email protected]> Reviewed-by: Michal Simek <[email protected]> # in a seperate mail Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions