OSDN Git Service

usb_bam: Fix usb bam_type assignment during suspend
authorManu Gautam <mgautam@codeaurora.org>
Wed, 6 Mar 2019 10:54:06 +0000 (16:24 +0530)
committerNathan Chancellor <natechancellor@gmail.com>
Fri, 27 Sep 2019 07:42:37 +0000 (00:42 -0700)
Driver incorrectly uses bam_mode (device/host) as bam_type
(dwc3/CI). This logic will work as long as bus-suspend
happens for dwc3 in device mode with BAM function but will
fail with CI core in device mode. However host mode BAM
pipes are no longer supported. Fix this by using proper
variable for bam_type instead of cur_bam_mode.

Change-Id: Id3b2bf3e578b5c339c46c940645b439dfafd28fb
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=077bb02a08aee79cc25bf12af1d109db7bdb8519
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
drivers/platform/msm/usb_bam.c

index a9bcabf..cdfe17d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2017, 2019, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -1400,7 +1400,7 @@ void usb_bam_finish_suspend_(struct work_struct *w)
 
        info_ptr = container_of(w, struct usb_bam_ipa_handshake_info,
                        finish_suspend_work);
-       cur_bam = info_ptr->cur_bam_mode;
+       cur_bam = info_ptr->bam_type;
 
        log_event_dbg("%s: Finishing suspend sequence(BAM=%s)\n", __func__,
                        bam_enable_strings[cur_bam]);