sound: usb: Fix check with usb_get_controller_id() for valid controller id
usb_get_controller_id() API shall returns non-negative number as valid id related to USB controller if alias is found. Current code considers zero as only valid controller id and doesn't update for secondary USB controller (i.e. id as 1). This results into passing controller id as zero instead of 1 causing bus error when ADSP USB driver is trying to access primary USB controller's register (it is supposed to access USB secondary controller's register) when primary USB controller related clocks are voted off. Fix this issue by updating check to consider all non-negative number as valid number and updating same. Change-Id: Id15edbdfd6c924000da18bbb82d0483d4d110d41 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
parent
0ea391bae1
commit
b61b1b39a1
@ -662,13 +662,11 @@ static int prepare_qmi_response(struct snd_usb_substream *subs,
|
||||
skip_sync_ep:
|
||||
resp->interrupter_num = uaudio_qdev->intr_num;
|
||||
resp->interrupter_num_valid = 1;
|
||||
|
||||
resp->controller_num_valid = 0;
|
||||
ret = usb_get_controller_id(subs->dev);
|
||||
if (!ret) {
|
||||
if (ret >= 0) {
|
||||
resp->controller_num = ret;
|
||||
resp->controller_num_valid = 1;
|
||||
} else {
|
||||
resp->controller_num_valid = 0;
|
||||
}
|
||||
|
||||
/* map xhci data structures PA memory to iova */
|
||||
|
Loading…
Reference in New Issue
Block a user