Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1505488 > unrolled thread

[PATCH] usb: dwc3: Fix error handling for core init

Started byVivek Gautam <vivek.gautam@codeaurora.org>
First post2016-10-21 08:20 +0200
Last post2016-10-21 13:00 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] usb: dwc3: Fix error handling for core init Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-21 08:20 +0200
    Re: [PATCH] usb: dwc3: Fix error handling for core init Felipe Balbi <balbi@kernel.org> - 2016-10-21 12:20 +0200
      Re: [PATCH] usb: dwc3: Fix error handling for core init Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-21 12:30 +0200
        [PATCH v2] usb: dwc3: Fix error handling for core init Vivek Gautam <vivek.gautam@codeaurora.org> - 2016-10-21 13:00 +0200

#1505488 — [PATCH] usb: dwc3: Fix error handling for core init

FromVivek Gautam <vivek.gautam@codeaurora.org>
Date2016-10-21 08:20 +0200
Subject[PATCH] usb: dwc3: Fix error handling for core init
Message-ID<suBlo-1KM-9@gated-at.bofh.it>
Fixing the sequence of events in dwc3_core_init() error exit path.
dwc3_core_exit() call is removed from the error path since,
whatever it's doing is already done.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
---

Based on usb-next.

 drivers/usb/dwc3/core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7287a76..fea4469 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -769,15 +769,14 @@ static int dwc3_core_init(struct dwc3 *dwc)
 	return 0;
 
 err4:
-	phy_power_off(dwc->usb2_generic_phy);
+	phy_power_off(dwc->usb3_generic_phy);
 
 err3:
-	phy_power_off(dwc->usb3_generic_phy);
+	phy_power_off(dwc->usb2_generic_phy);
 
 err2:
 	usb_phy_set_suspend(dwc->usb2_phy, 1);
 	usb_phy_set_suspend(dwc->usb3_phy, 1);
-	dwc3_core_exit(dwc);
 
 err1:
 	usb_phy_shutdown(dwc->usb2_phy);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [next] | [standalone]


#1505758

FromFelipe Balbi <balbi@kernel.org>
Date2016-10-21 12:20 +0200
Message-ID<suF5E-4cr-15@gated-at.bofh.it>
In reply to#1505488

[Multipart message — attachments visible in raw view] — view raw

Hi,

Vivek Gautam <vivek.gautam@codeaurora.org> writes:
> Fixing the sequence of events in dwc3_core_init() error exit path.
> dwc3_core_exit() call is removed from the error path since,
> whatever it's doing is already done.
>
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>

Care to blame the original commit and Cc stable if applicable?

-- 
balbi

[toc] | [prev] | [next] | [standalone]


#1505765

FromVivek Gautam <vivek.gautam@codeaurora.org>
Date2016-10-21 12:30 +0200
Message-ID<suFfk-4fQ-49@gated-at.bofh.it>
In reply to#1505758
Hi,


On Fri, Oct 21, 2016 at 3:45 PM, Felipe Balbi <balbi@kernel.org> wrote:
>
> Hi,
>
> Vivek Gautam <vivek.gautam@codeaurora.org> writes:
>> Fixing the sequence of events in dwc3_core_init() error exit path.
>> dwc3_core_exit() call is removed from the error path since,
>> whatever it's doing is already done.
>>
>> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
>> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
>
> Care to blame the original commit and Cc stable if applicable?

Ok, will do that.


Thanks
Vivek


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1505772 — [PATCH v2] usb: dwc3: Fix error handling for core init

FromVivek Gautam <vivek.gautam@codeaurora.org>
Date2016-10-21 13:00 +0200
Subject[PATCH v2] usb: dwc3: Fix error handling for core init
Message-ID<suFIm-4q7-3@gated-at.bofh.it>
In reply to#1505765
Fixing the sequence of events in dwc3_core_init() error exit path.
dwc3_core_exit() call is also removed from the error path since,
whatever it's doing is already done.

Fixes: c499ff7 usb: dwc3: core: re-factor init and exit paths

Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Stable <stable@vger.kernel.org> # 4.8+
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---

Based on usb-next.
Build tested.

Changes since v1:
 - Added reference to original commit that this patch fixes.
 - CC'ed kernel stable.

 drivers/usb/dwc3/core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7287a76..fea4469 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -769,15 +769,14 @@ static int dwc3_core_init(struct dwc3 *dwc)
 	return 0;
 
 err4:
-	phy_power_off(dwc->usb2_generic_phy);
+	phy_power_off(dwc->usb3_generic_phy);
 
 err3:
-	phy_power_off(dwc->usb3_generic_phy);
+	phy_power_off(dwc->usb2_generic_phy);
 
 err2:
 	usb_phy_set_suspend(dwc->usb2_phy, 1);
 	usb_phy_set_suspend(dwc->usb3_phy, 1);
-	dwc3_core_exit(dwc);
 
 err1:
 	usb_phy_shutdown(dwc->usb2_phy);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web