summaryrefslogtreecommitdiff
path: root/Extra
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-10-20 14:52:57 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-10-20 14:54:58 +0200
commitabafb7e1679f268fea1f5b0f911cb75fcda44857 (patch)
treeca5fe9572765ba08798343800ebc44129ff2e378 /Extra
parente843d29eec50dfcad948859b545eaf529731d28e (diff)
trafgen: fix resource leaks
Fix two resource leaks in trafgen. Fixes Coverity CID 1381807 and CID 1381811. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'Extra')
0 files changed, 0 insertions, 0 deletions
one when connecting a USB mass storage device to a hub. This is because when connecting a USB mass storage device to a hub, the initial DMA transfers can take over 200ms to complete and cppi41 autosuspend delay times out. To fix the issue, we want to implement refcounting for chan_busy array that contains the active dma transfers. Increasing the autosuspend delay won't help as that the delay could be potentially seconds, and it's best to let the USB subsystem to deal with the timeouts on errors. The earlier attempt for runtime PM was buggy as the pm_runtime_get/put() calls could get unpaired easily as they did not follow the state of the chan_busy array as described in commit 098de42ad670 ("dmaengine: cppi41: Fix unpaired pm runtime when only a USB hub is connected". Let's fix the issue by adding pm_runtime_get() to where a new transfer is added to the chan_busy array, and calls to pm_runtime_put() where chan_busy array entry is cleared. This prevents any autosuspend timeouts from happening while dma transfers are active. Fixes: 098de42ad670 ("dmaengine: cppi41: Fix unpaired pm runtime when only a USB hub is connected") Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Bin Liu <b-liu@ti.com> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Patrick Titiano <ptitiano@baylibre.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'net')