usb: f_qdss: Return -EINVAL instead of -EAGAIN if debug_inface is enabled
Currently if a target uses a composition where both ctrl & data
interface exists, then debug_inface is enabled from userspace. The
f_qdss driver checks for debug_inface_enabled in alloc_req. If the
variable is set then it populates the ctrl_write_pool instead of
data_write_pool. Due to this when qdss_write is called it finds
data_write_pool empty & it will return error message.
However, coresight driver will still request continuously for
qdss_write irrespective of ctrl or data pool. This eventually results
in excessive logging & the device might crash giving watchdog bark
error.
To avoid continuous request, instead of returning -EAGAIN check for
debug_inface_enabled along with empty status of ctrl_data_pool,
data_write_pool and returning -EINVAL.
Change-Id: I8cc6f0f4f2d2b880326c2322d5d907b332ab771b
Signed-off-by:
Udipto Goswami <ugoswami@codeaurora.org>
Loading
Please register or sign in to comment