[RESEND PATCH] usb: chipidea: delete an useless header include

2017-01-22 Thread Jisheng Zhang
is for net phy drivers, we don't need it. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 3dbb4a21ab44..77078083e9fb 100644 --- a/drivers/usb/chipidea/core.c

[RESEND PATCH] usb: chipidea: usb2: delete the redundant setting default DMA mask code

2017-01-22 Thread Jisheng Zhang
nt code at driver. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/ci_hdrc_usb2.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c index 4456d2cf80ff..d162cc0bb8ce 100644 --- a/drivers/usb/chipidea/ci_hdrc_us

[PATCH v2 7/7] usb: xhci: plat: add vbus regulator control

2015-12-07 Thread Jisheng Zhang
The Marvell BG4CT STB board has board level vbus control through gpio. This patch adds the vbus regulator control to support this board. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 39 ++- drivers/usb/host/xhci.h | 2 ++ 2 files

[PATCH v2 0/7] usb: xhci-plat: support generic PHY and vbus regulator

2015-12-07 Thread Jisheng Zhang
dereference in [PATCH 7/7] Jisheng Zhang (7): usb: xhci: plat: Fix suspend/resume when the optional clk exists usb: xhci: plat: attach the usb_phy to the correct hcd usb: xhci: plat: Fix suspend/resume when the optional usb_phy exists usb: xhci: plat: sort the headers in alphabetic order usb

[PATCH v2 2/7] usb: xhci: plat: attach the usb_phy to the correct hcd

2015-12-07 Thread Jisheng Zhang
Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the usb_phy for usb3, but it attached the usb_phy to incorrect hcd. The xhci->shared_hcd is the hcd for usb3, this patch fixes this issue by attach the usb_phy to the xhci->shared_hcd. Signed-off-by: Jisheng Zhang

[PATCH v2 1/7] usb: xhci: plat: Fix suspend/resume when the optional clk exists

2015-12-07 Thread Jisheng Zhang
Commit 4718c1774051 ("usb: host: xhci-plat: add clock support") adds optional clk support, but it forgets to prepare/disable and enable/unprepare the clk in the resume/suspend path. This path fixes this issue by adding missing clk related calls. Signed-off-by: Jisheng Zhang Fixes: 47

[PATCH v2 6/7] usb: xhci: plat: add generic PHY support

2015-12-07 Thread Jisheng Zhang
Marvell BG4CT SoC needs two phy: one for usb2 and another for usb3. Add the calls to retrieve generic PHY to xhci plat in order to support this. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 87 ++-- 1 file changed, 75 insertions(+), 12

[PATCH v2 5/7] usb: xhci: plat: Remove checks for optional clock in error/remove path

2015-12-07 Thread Jisheng Zhang
Commit 63589e92c2d9 ("clk: Ignore error and NULL pointers passed to clk_{unprepare, disable}()") allows NULL or error pointer to be passed unconditionally. This patch is to simplify probe error and remove code paths. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 6

[PATCH v2 3/7] usb: xhci: plat: Fix suspend/resume when the optional usb_phy exists

2015-12-07 Thread Jisheng Zhang
Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the usb_phy for usb3, but it forgets to shutdown/init the usb_phy in the suspend/resume path. This patch fixes this issue by adding missing usb_phy related calls. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-

[PATCH v2 4/7] usb: xhci: plat: sort the headers in alphabetic order

2015-12-07 Thread Jisheng Zhang
Sorting the headers in alphabetic order will help to reduce the conflict when adding new headers later. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci

[PATCH] usb: chipidea: usb2: delete the redundant setting default DMA mask code

2016-08-19 Thread Jisheng Zhang
nt code at driver. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/ci_hdrc_usb2.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c index 4456d2c..d162cc0 100644 --- a/drivers/usb/chipidea/ci_hdrc_usb2.c +++ b/d

[PATCH] usb: chipidea: delete an useless header file

2016-08-19 Thread Jisheng Zhang
is for net phy drivers, we don't need it. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 69426e6..ae12595 100644 --- a/drivers/usb/chipidea/core.c +++ b/driver

[PATCH] usb: chipidea: support generic phy in PM code path

2016-08-19 Thread Jisheng Zhang
Support generic phy in PM code path: call phy_power_off/phy_power_on in ci_controller_suspend/ci_controller_resume. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb

[PATCH v2] usb: chipidea: delete an useless header include

2016-08-19 Thread Jisheng Zhang
is for net phy drivers, we don't need it. Signed-off-by: Jisheng Zhang --- Since v1: - fix commit subject. Thank Sergei for pointing it out. drivers/usb/chipidea/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c

Re: [PATCH] usb: chipidea: support generic phy in PM code path

2016-08-21 Thread Jisheng Zhang
Hi Peter, On Mon, 22 Aug 2016 13:33:08 +0800 Peter Chen wrote: > On Fri, Aug 19, 2016 at 08:10:13PM +0800, Jisheng Zhang wrote: > > Support generic phy in PM code path: call phy_power_off/phy_power_on > > in ci_controller_suspend/ci_controller_resume. > > > > S

Re: [PATCH] usb: chipidea: support generic phy in PM code path

2016-08-22 Thread Jisheng Zhang
+ Kishon Hi Peter, Kishon, On Mon, 22 Aug 2016 15:29:07 +0800 Peter Chen wrote: > On Mon, Aug 22, 2016 at 02:39:21PM +0800, Jisheng Zhang wrote: > > Hi Peter, > > > > On Mon, 22 Aug 2016 13:33:08 +0800 Peter Chen wrote: > > > > > On Fri, Aug 19, 2016 at 0

Re: [PATCH] usb: chipidea: support generic phy in PM code path

2016-08-22 Thread Jisheng Zhang
On Mon, 22 Aug 2016 13:53:37 +0530 Kishon Vijay Abraham I wrote: > Hi, > > On Monday 22 August 2016 01:44 PM, Jisheng Zhang wrote: > > + Kishon > > > > Hi Peter, Kishon, > > > > On Mon, 22 Aug 2016 15:29:07 +0800 Peter Chen wrote: > > > >

[RESEND PATCH v2 1/7] usb: xhci: plat: Fix suspend/resume when the optional clk exists

2016-04-26 Thread Jisheng Zhang
Commit 4718c1774051 ("usb: host: xhci-plat: add clock support") adds optional clk support, but it forgets to prepare/disable and enable/unprepare the clk in the resume/suspend path. This path fixes this issue by adding missing clk related calls. Signed-off-by: Jisheng Zhang Fixes: 47

[RESEND PATCH v2 4/7] usb: xhci: plat: sort the headers in alphabetic order

2016-04-26 Thread Jisheng Zhang
Sorting the headers in alphabetic order will help to reduce the conflict when adding new headers later. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci

[RESEND PATCH v2 0/7] usb: xhci-plat: support generic PHY and vbus regulator

2016-04-26 Thread Jisheng Zhang
dereference in [PATCH 7/7] Jisheng Zhang (7): usb: xhci: plat: Fix suspend/resume when the optional clk exists usb: xhci: plat: attach the usb_phy to the correct hcd usb: xhci: plat: Fix suspend/resume when the optional usb_phy exists usb: xhci: plat: sort the headers in alphabetic order usb

[RESEND PATCH v2 7/7] usb: xhci: plat: add vbus regulator control

2016-04-26 Thread Jisheng Zhang
The Marvell BG4CT STB board has board level vbus control through gpio. This patch adds the vbus regulator control to support this board. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 40 +++- drivers/usb/host/xhci.h | 2 ++ 2 files

[RESEND PATCH v2 6/7] usb: xhci: plat: add generic PHY support

2016-04-26 Thread Jisheng Zhang
Marvell BG4CT SoC needs two phy: one for usb2 and another for usb3. Add the calls to retrieve generic PHY to xhci plat in order to support this. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 87 ++-- 1 file changed, 75 insertions(+), 12

[RESEND PATCH v2 5/7] usb: xhci: plat: Remove checks for optional clock in error/remove path

2016-04-26 Thread Jisheng Zhang
Commit 63589e92c2d9 ("clk: Ignore error and NULL pointers passed to clk_{unprepare, disable}()") allows NULL or error pointer to be passed unconditionally. This patch is to simplify probe error and remove code paths. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-plat.c | 6

[RESEND PATCH v2 2/7] usb: xhci: plat: attach the usb_phy to the correct hcd

2016-04-26 Thread Jisheng Zhang
Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the usb_phy for usb3, but it attached the usb_phy to incorrect hcd. The xhci->shared_hcd is the hcd for usb3, this patch fixes this issue by attach the usb_phy to the xhci->shared_hcd. Signed-off-by: Jisheng Zhang

[RESEND PATCH v2 3/7] usb: xhci: plat: Fix suspend/resume when the optional usb_phy exists

2016-04-26 Thread Jisheng Zhang
Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the usb_phy for usb3, but it forgets to shutdown/init the usb_phy in the suspend/resume path. This patch fixes this issue by adding missing usb_phy related calls. Signed-off-by: Jisheng Zhang --- drivers/usb/host/xhci-

Re: [RESEND PATCH v2 1/7] usb: xhci: plat: Fix suspend/resume when the optional clk exists

2016-04-26 Thread Jisheng Zhang
Dear Felipe, On Wed, 27 Apr 2016 08:25:38 +0300 Felipe Balbi wrote: > Hi, > > (since you're fixing somebody else's commit, it's nice to Cc authors) > > Jisheng Zhang writes: > > Commit 4718c1774051 ("usb: host: xhci-plat: add clock support") ad

Re: [RESEND PATCH v2 2/7] usb: xhci: plat: attach the usb_phy to the correct hcd

2016-04-26 Thread Jisheng Zhang
d, MAINTAINERS need to updated. > > Jisheng Zhang writes: > > Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the > > usb_phy for usb3, but it attached the usb_phy to incorrect hcd. The > > where did you see that's the USB3 phy ? I can

Re: [RESEND PATCH v2 5/7] usb: xhci: plat: Remove checks for optional clock in error/remove path

2016-04-26 Thread Jisheng Zhang
Dear Felipe, On Wed, 27 Apr 2016 08:33:52 +0300 Felipe Balbi wrote: > Jisheng Zhang writes: > > Commit 63589e92c2d9 ("clk: Ignore error and NULL pointers passed to > > clk_{unprepare, disable}()") allows NULL or error pointer to be passed > > unconditionally. &g

Re: [RESEND PATCH v2 6/7] usb: xhci: plat: add generic PHY support

2016-04-26 Thread Jisheng Zhang
Dear Felipe, On Wed, 27 Apr 2016 08:35:58 +0300 Felipe Balbi wrote: > Hi, > > Jisheng Zhang writes: > > Marvell BG4CT SoC needs two phy: one for usb2 and another for usb3. Add > > the calls to retrieve generic PHY to xhci plat in order to support this. > > >

Re: [RESEND PATCH v2 7/7] usb: xhci: plat: add vbus regulator control

2016-04-27 Thread Jisheng Zhang
Dear Mark, On Wed, 27 Apr 2016 10:57:39 +0100 Mark Brown wrote: > On Wed, Apr 27, 2016 at 08:37:20AM +0300, Felipe Balbi wrote: > > Jisheng Zhang writes: > > > > + vbus = devm_regulator_get(&pdev->dev, "vbus"); > > > devm_regulator_get_op

[PATCH] usb: phy: phy-mxs-usb: set the correct platform drvdata

2013-11-06 Thread Jisheng Zhang
We need to set mxs_phy rather as the platform drvdata so that we can get the correct mxs_phy in mxs_phy_remove(). Change-Id: I6e1753cc978e2ed3fbb3d1865be0c54031d337d2 Signed-off-by: Jisheng Zhang --- drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] usb: phy: phy-mxs-usb: set the correct platform drvdata

2013-11-06 Thread Jisheng Zhang
On Wed, 6 Nov 2013 18:34:47 -0800 Shawn Guo wrote: > On Thu, Nov 07, 2013 at 10:26:20AM +0800, Jisheng Zhang wrote: > > We need to set mxs_phy rather as the platform drvdata so that we can get > > the correct mxs_phy in mxs_phy_remove(). >

[PATCH v2] usb: phy: phy-mxs-usb: set the correct platform drvdata

2013-11-06 Thread Jisheng Zhang
We need to set mxs_phy rather as the platform drvdata so that we can get the correct mxs_phy in mxs_phy_remove(). Signed-off-by: Jisheng Zhang --- drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy

[PATCH] usb: Use dma_zalloc_coherent

2014-11-12 Thread Jisheng Zhang
Use the zeroing version instead of dma_alloc_coherent and memset() as 0. Signed-off-by: Jisheng Zhang --- drivers/usb/dwc2/hcd_ddma.c | 5 + drivers/usb/host/uhci-hcd.c | 3 +-- drivers/usb/host/xhci-mem.c | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb

[RFC] usb: dwc3: add DWC3_SKIP_USB3PHY and DWC3_SKIP_USB2_PHY quirks

2014-12-08 Thread Jisheng Zhang
Hi list, On platforms which has native usb hosts/phys and pci-dwc3 controller, the dwc3 core may get the wrong usb2_phy and usb3_phy by devm_usb_get_phy(). It depends on which usb phy driver is initialized firstly, the usb_phy_generic or the native/real usb phy driver. Before all old USB phy libr

Re: [RFC] usb: dwc3: add DWC3_SKIP_USB3PHY and DWC3_SKIP_USB2_PHY quirks

2015-01-08 Thread Jisheng Zhang
Hi Felipe, On Thu, 8 Jan 2015 09:08:15 -0800 Felipe Balbi wrote: > Hi, > > On Mon, Dec 08, 2014 at 09:35:51PM +0800, Jisheng Zhang wrote: > > On platforms which has native usb hosts/phys and pci-dwc3 controller, > > the dwc3 core may get the wrong usb2_phy and usb3_phy by

Re: [PATCH 4/9] usb: phy: add the Berlin USB PHY driver

2014-06-09 Thread Jisheng Zhang
Dear Sebastian and Antoine, On Fri, 6 Jun 2014 03:54:06 -0700 Sebastian Hesselbarth wrote: > > + > > +#define to_berlin_phy_priv(p) container_of((p), struct > > berlin_phy_priv, phy) + > > +struct berlin_phy_priv { > > + void __iomem*base; > > + struct usb_phy phy;

Re: [RESEND] phy: core: Get a refcount to phy in devm_of_phy_get_by_index()

2015-11-16 Thread Jisheng Zhang
Hi, On Tue, 17 Nov 2015 13:56:48 +0800 Chunfeng Yun wrote: > On driver detach, devm_phy_release() will put a refcount to > the phy, so gets a refconut to it before return. > > Change-Id: I56fe428bf945f19c38d56245978c8ca17340eb2c This line need to be removed > Signed-off-by: Chunfeng Yun >

Re: [PATCH 2/7] usb: xhci: plat: attach the usb_phy to the correct hcd

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org On Fri, 4 Dec 2015 22:10:47 +0800 Jisheng Zhang wrote: > Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the > usb_phy for usb3, but it attached the usb_phy to incorrect hcd. The > xhci->shared_hcd is the hcd for usb3, this

Re: [PATCH 1/7] usb: xhci: plat: Fix suspend/resume when the optional clk exists

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org On Fri, 4 Dec 2015 22:10:46 +0800 Jisheng Zhang wrote: > Commit 4718c1774051 ("usb: host: xhci-plat: add clock support") adds > optional clk support, but it forgets to prepare/disable and > enable/unprepare the clk in the resume/suspend path. Thi

Re: [PATCH 3/7] usb: xhci: plat: Fix suspend/resume when the optional usb_phy exists

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org On Fri, 4 Dec 2015 22:10:48 +0800 Jisheng Zhang wrote: > Commit 7b8ef22ea547 ("usb: xhci: plat: Add USB phy support") adds the > usb_phy for usb3, but it forgets to shutdown/init the usb_phy in the > suspend/resume path. This patch fixes this issu

Re: [PATCH 0/7] usb: xhci-plat: support generic PHY and vbus regulator

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org Sorry, I forget to do so. Will cc linux-usb in the future. On Fri, 4 Dec 2015 22:10:45 +0800 Jisheng Zhang wrote: > The Marvell BG4CT has xhci controller. This controller has two phys: > one for usb2 and another for usb3. BG4CT boards have board level vbus >

Re: [PATCH 4/7] usb: xhci: plat: sort the headers in alphabetic order

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org On Fri, 4 Dec 2015 22:10:49 +0800 Jisheng Zhang wrote: > Sorting the headers in alphabetic order will help to reduce the conflict > when adding new headers later. > > Signed-off-by: Jisheng Zhang > --- > drivers/usb/host/xhci-plat.c | 4 ++-- &g

Re: [PATCH 5/7] usb: xhci: plat: Remove checks for optional clock in error/remove path

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org On Fri, 4 Dec 2015 22:10:50 +0800 Jisheng Zhang wrote: > Commit 63589e92c2d9 ("clk: Ignore error and NULL pointers passed to > clk_{unprepare, disable}()") allows NULL or error pointer to be passed > unconditionally. > > This patch is to

Re: [PATCH 7/7] usb: xhci: plat: add vbus regulator control

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org On Fri, 4 Dec 2015 22:10:52 +0800 Jisheng Zhang wrote: > The Marvell BG4CT STB board has board level vbus control through gpio. > This patch adds the vbus regulator control to support this board. > > Signed-off-by: Jisheng Zhang > --- > dri

Re: [PATCH 6/7] usb: xhci: plat: add generic PHY support

2015-12-04 Thread Jisheng Zhang
cc linux-usb@vger.kernel.org On Fri, 4 Dec 2015 22:10:51 +0800 Jisheng Zhang wrote: > Marvell BG4CT SoC needs two phy: one for usb2 and another for usb3. Add > the calls to retrieve generic PHY to xhci plat in order to support this. > > Signed-off-by: Jisheng Zhang > --- >

Re: lan78xx: About 8000 usb interrupts per second when idle

2019-04-10 Thread Jisheng Zhang
On Tue, 9 Apr 2019 09:28:16 + Minas Harutyunyan wrote: > > Hi Stefan, > > > Hi Minas, > > > > Am 09.04.19 um 08:54 schrieb Jisheng Zhang: > >> On Mon, 8 Apr 2019 16:05:51 +0800 Jisheng Zhang wrote: > >> > >>> Hi Stefan, > >

[PATCH] usb: chipidea: Don't select EXTCON

2018-03-29 Thread Jisheng Zhang
Not all chipidea users need EXTCON, so it's better to avoid unconditionally select EXTCON, this could save us 2KB kernel Image size. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/Kconfig b/driver

[PATCH resend] usb: chipidea: Don't select EXTCON

2018-04-19 Thread Jisheng Zhang
Not all chipidea users need EXTCON, so it's better to avoid unconditionally select EXTCON, this could save us 2KB kernel Image size. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/Kconfig b/driver

Re: [PATCH resend] usb: chipidea: Don't select EXTCON

2018-04-20 Thread Jisheng Zhang
Hi Peter On Fri, 20 Apr 2018 01:38:42 + Peter Chen wrote: > > > drivers/usb/chipidea/Kconfig | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig > > index > > 785f0ed037f7..97509172d536 100644 > > --- a/drivers/usb/chi

Re: [PATCH resend] usb: chipidea: Don't select EXTCON

2018-04-23 Thread Jisheng Zhang
On Fri, 20 Apr 2018 09:35:54 + Peter Chen wrote: > > > > > > > Sorry to reply late, are you really care 2KB code side? Since many > > > users use EXTCON to handle vbus and id, it is hard just delete it. I > > > could accept patch for your specific platforms, like: > > > > > > + select EXTCON

[PATCH] usb: host: xhci-plat: move clk to plat own private structure

2017-11-27 Thread Jisheng Zhang
commit 4efb2f694114 ("usb: host: xhci-plat: add struct xhci_plat_priv") introduced struct xhci_plat_priv to hold the plat driver's specific variables. The clk is only for plat driver, so let's move it to the proper structure. Signed-off-by: Jisheng Zhang --- drivers/usb/h

[PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-24 Thread Jisheng Zhang
ret_from_fork+0x10/0x50 Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/udc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index f88e9157fad0..60a786c87c06 100644 --- a/drivers/usb/chipidea/udc.c +++

Re: [PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-25 Thread Jisheng Zhang
Hi Peter, On Tue, 25 Apr 2017 16:29:48 +0800 Peter Chen wrote: > On Mon, Apr 24, 2017 at 12:35:51PM +0000, Jisheng Zhang wrote: > > Fix below NULL pointer dereference. we set ci->roles[CI_ROLE_GADGET] > > too early in ci_hdrc_gadget_init(), if udc_start() fails due to some

[PATCH] usb: chipidea: properly handle host or gadget initialization failure

2017-04-25 Thread Jisheng Zhang
If ci_hdrc_host_init() or ci_hdrc_gadget_init() returns error and the error != -ENXIO, as Peter pointed out, "it stands for initialization for host or gadget has failed", so we'd better return failure rather continue. Signed-off-by: Jisheng Zhang --- drivers/usb/chipi

[RFC] usb: chipidea: set dma_ops for the created ci_hdrc platform_device

2017-04-25 Thread Jisheng Zhang
Hi all, After commit 1dccb598df549 ("arm64: simplify dma_get_ops"), the chipidea driver can't work any more on Marvell Berlin arm64 platforms, the reason is the created ci_hdrc platform_device's dma_ops is dummy_dma_ops, so all dma related operations will fail. The fix I can think of would be some

Re: [PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-26 Thread Jisheng Zhang
On Tue, 25 Apr 2017 17:21:59 +0200 Stefan Wahren wrote: > Am 25.04.2017 um 11:20 schrieb Peter Chen: > > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index f88e9157fad0..60a786c87c06 100644 > --- a/drivers/usb/chipidea/udc.c > +++ b/drivers/usb/

Re: [RFC] usb: chipidea: set dma_ops for the created ci_hdrc platform_device

2017-04-26 Thread Jisheng Zhang
On Tue, 25 Apr 2017 13:09:27 +0200 Arnd Bergmann wrote: > On Tue, Apr 25, 2017 at 12:01 PM, Jisheng Zhang wrote: > > Hi all, > > > > After commit 1dccb598df549 ("arm64: simplify dma_get_ops"), the chipidea > > driver can't work any more on Marvell Ber

[PATCH v2] usb: chipidea: properly handle host or gadget initialization failure

2017-04-26 Thread Jisheng Zhang
we should also check ci->roles[CI_ROLE_GADGET]. Signed-off-by: Jisheng Zhang --- Since v1: - check ci->roles[CI_ROLE_GADGET] before destroying the otg, suggested by Peter. drivers/usb/chipidea/core.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) dif