linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: call set incr burst type func()
@ 2018-07-23  3:34 Pengbo Mu
  2018-07-23  5:16 ` Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Pengbo Mu @ 2018-07-23  3:34 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-kernel, linux-usb, ran.wang_1, pengbo.mu

Call dwc3_set_incr_burst_type() in dwc3_core_init().

Signed-off-by: Pengbo Mu <pengbo.mu@nxp.com>
---
Changes in v1:
 - add the calling of dwc3_set_incr_burst_type.
---
 drivers/usb/dwc3/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 29df9e8..21e4931 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -932,6 +932,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
 	/* Adjust Frame Length */
 	dwc3_frame_length_adjustment(dwc);
 
+	dwc3_set_incr_burst_type(dwc);
+
 	usb_phy_set_suspend(dwc->usb2_phy, 0);
 	usb_phy_set_suspend(dwc->usb3_phy, 0);
 	ret = phy_power_on(dwc->usb2_generic_phy);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  3:34 [PATCH] usb: dwc3: call set incr burst type func() Pengbo Mu
@ 2018-07-23  5:16 ` Greg Kroah-Hartman
  2018-07-23  6:37   ` Pengbo Mu
  2018-07-23  7:05 ` kbuild test robot
  2018-07-23  7:10 ` kbuild test robot
  2 siblings, 1 reply; 12+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-23  5:16 UTC (permalink / raw)
  To: Pengbo Mu; +Cc: Felipe Balbi, linux-kernel, linux-usb, ran.wang_1

On Mon, Jul 23, 2018 at 11:34:13AM +0800, Pengbo Mu wrote:
> Call dwc3_set_incr_burst_type() in dwc3_core_init().
> 

That says what you did, not why you are doing this.

Please fix up.

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  5:16 ` Greg Kroah-Hartman
@ 2018-07-23  6:37   ` Pengbo Mu
  2018-07-23  6:59     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 12+ messages in thread
From: Pengbo Mu @ 2018-07-23  6:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Felipe Balbi, linux-kernel, linux-usb, Ran Wang

Hi Greg,

This patch should be tied with https://patchwork.kernel.org/patch/10539535/.
After sent four patches, I found I was missing this call.
Thanks for your advice. I will fix it immediately!

Pengbo Mu
-----Original Message-----
From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org] 
Sent: 2018年7月23日 13:16
To: Pengbo Mu <pengbo.mu@nxp.com>
Cc: Felipe Balbi <balbi@kernel.org>; linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org; Ran Wang <ran.wang_1@nxp.com>
Subject: Re: [PATCH] usb: dwc3: call set incr burst type func()

On Mon, Jul 23, 2018 at 11:34:13AM +0800, Pengbo Mu wrote:
> Call dwc3_set_incr_burst_type() in dwc3_core_init().
> 

That says what you did, not why you are doing this.

Please fix up.

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  6:37   ` Pengbo Mu
@ 2018-07-23  6:59     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-23  6:59 UTC (permalink / raw)
  To: Pengbo Mu; +Cc: Felipe Balbi, linux-kernel, linux-usb, Ran Wang

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Mon, Jul 23, 2018 at 06:37:13AM +0000, Pengbo Mu wrote:
> Hi Greg,
> 
> This patch should be tied with https://patchwork.kernel.org/patch/10539535/.
> After sent four patches, I found I was missing this call.
> Thanks for your advice. I will fix it immediately!

Please send the series properly, with this one as part of it, otherwise
people will think it it separate and stand-alone.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  3:34 [PATCH] usb: dwc3: call set incr burst type func() Pengbo Mu
  2018-07-23  5:16 ` Greg Kroah-Hartman
@ 2018-07-23  7:05 ` kbuild test robot
  2018-07-23  9:29   ` Pengbo Mu
  2018-07-23  7:10 ` kbuild test robot
  2 siblings, 1 reply; 12+ messages in thread
From: kbuild test robot @ 2018-07-23  7:05 UTC (permalink / raw)
  To: Pengbo Mu
  Cc: kbuild-all, Felipe Balbi, Greg Kroah-Hartman, linux-kernel,
	linux-usb, ran.wang_1, pengbo.mu

[-- Attachment #1: Type: text/plain, Size: 6306 bytes --]

Hi Pengbo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on balbi-usb/next]
[also build test ERROR on v4.18-rc6 next-20180720]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Pengbo-Mu/usb-dwc3-call-set-incr-burst-type-func/20180723-132027
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
config: i386-randconfig-s1-201829 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/usb/dwc3/core.c: In function 'dwc3_core_init':
>> drivers/usb/dwc3/core.c:843:2: error: implicit declaration of function 'dwc3_set_incr_burst_type' [-Werror=implicit-function-declaration]
     dwc3_set_incr_burst_type(dwc);
     ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/dwc3_set_incr_burst_type +843 drivers/usb/dwc3/core.c

   780	
   781	/**
   782	 * dwc3_core_init - Low-level initialization of DWC3 Core
   783	 * @dwc: Pointer to our controller context structure
   784	 *
   785	 * Returns 0 on success otherwise negative errno.
   786	 */
   787	static int dwc3_core_init(struct dwc3 *dwc)
   788	{
   789		u32			reg;
   790		int			ret;
   791	
   792		if (!dwc3_core_is_valid(dwc)) {
   793			dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n");
   794			ret = -ENODEV;
   795			goto err0;
   796		}
   797	
   798		/*
   799		 * Write Linux Version Code to our GUID register so it's easy to figure
   800		 * out which kernel version a bug was found.
   801		 */
   802		dwc3_writel(dwc->regs, DWC3_GUID, LINUX_VERSION_CODE);
   803	
   804		/* Handle USB2.0-only core configuration */
   805		if (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) ==
   806				DWC3_GHWPARAMS3_SSPHY_IFC_DIS) {
   807			if (dwc->maximum_speed == USB_SPEED_SUPER)
   808				dwc->maximum_speed = USB_SPEED_HIGH;
   809		}
   810	
   811		ret = dwc3_phy_setup(dwc);
   812		if (ret)
   813			goto err0;
   814	
   815		if (!dwc->ulpi_ready) {
   816			ret = dwc3_core_ulpi_init(dwc);
   817			if (ret)
   818				goto err0;
   819			dwc->ulpi_ready = true;
   820		}
   821	
   822		if (!dwc->phys_ready) {
   823			ret = dwc3_core_get_phy(dwc);
   824			if (ret)
   825				goto err0a;
   826			dwc->phys_ready = true;
   827		}
   828	
   829		ret = dwc3_core_soft_reset(dwc);
   830		if (ret)
   831			goto err0a;
   832	
   833		dwc3_core_setup_global_control(dwc);
   834		dwc3_core_num_eps(dwc);
   835	
   836		ret = dwc3_setup_scratch_buffers(dwc);
   837		if (ret)
   838			goto err1;
   839	
   840		/* Adjust Frame Length */
   841		dwc3_frame_length_adjustment(dwc);
   842	
 > 843		dwc3_set_incr_burst_type(dwc);
   844	
   845		usb_phy_set_suspend(dwc->usb2_phy, 0);
   846		usb_phy_set_suspend(dwc->usb3_phy, 0);
   847		ret = phy_power_on(dwc->usb2_generic_phy);
   848		if (ret < 0)
   849			goto err2;
   850	
   851		ret = phy_power_on(dwc->usb3_generic_phy);
   852		if (ret < 0)
   853			goto err3;
   854	
   855		ret = dwc3_event_buffers_setup(dwc);
   856		if (ret) {
   857			dev_err(dwc->dev, "failed to setup event buffers\n");
   858			goto err4;
   859		}
   860	
   861		/*
   862		 * ENDXFER polling is available on version 3.10a and later of
   863		 * the DWC_usb3 controller. It is NOT available in the
   864		 * DWC_usb31 controller.
   865		 */
   866		if (!dwc3_is_usb31(dwc) && dwc->revision >= DWC3_REVISION_310A) {
   867			reg = dwc3_readl(dwc->regs, DWC3_GUCTL2);
   868			reg |= DWC3_GUCTL2_RST_ACTBITLATER;
   869			dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
   870		}
   871	
   872		if (dwc->revision >= DWC3_REVISION_250A) {
   873			reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
   874	
   875			/*
   876			 * Enable hardware control of sending remote wakeup
   877			 * in HS when the device is in the L1 state.
   878			 */
   879			if (dwc->revision >= DWC3_REVISION_290A)
   880				reg |= DWC3_GUCTL1_DEV_L1_EXIT_BY_HW;
   881	
   882			if (dwc->dis_tx_ipgap_linecheck_quirk)
   883				reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS;
   884	
   885			dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
   886		}
   887	
   888		/*
   889		 * Must config both number of packets and max burst settings to enable
   890		 * RX and/or TX threshold.
   891		 */
   892		if (dwc3_is_usb31(dwc) && dwc->dr_mode == USB_DR_MODE_HOST) {
   893			u8 rx_thr_num = dwc->rx_thr_num_pkt_prd;
   894			u8 rx_maxburst = dwc->rx_max_burst_prd;
   895			u8 tx_thr_num = dwc->tx_thr_num_pkt_prd;
   896			u8 tx_maxburst = dwc->tx_max_burst_prd;
   897	
   898			if (rx_thr_num && rx_maxburst) {
   899				reg = dwc3_readl(dwc->regs, DWC3_GRXTHRCFG);
   900				reg |= DWC31_RXTHRNUMPKTSEL_PRD;
   901	
   902				reg &= ~DWC31_RXTHRNUMPKT_PRD(~0);
   903				reg |= DWC31_RXTHRNUMPKT_PRD(rx_thr_num);
   904	
   905				reg &= ~DWC31_MAXRXBURSTSIZE_PRD(~0);
   906				reg |= DWC31_MAXRXBURSTSIZE_PRD(rx_maxburst);
   907	
   908				dwc3_writel(dwc->regs, DWC3_GRXTHRCFG, reg);
   909			}
   910	
   911			if (tx_thr_num && tx_maxburst) {
   912				reg = dwc3_readl(dwc->regs, DWC3_GTXTHRCFG);
   913				reg |= DWC31_TXTHRNUMPKTSEL_PRD;
   914	
   915				reg &= ~DWC31_TXTHRNUMPKT_PRD(~0);
   916				reg |= DWC31_TXTHRNUMPKT_PRD(tx_thr_num);
   917	
   918				reg &= ~DWC31_MAXTXBURSTSIZE_PRD(~0);
   919				reg |= DWC31_MAXTXBURSTSIZE_PRD(tx_maxburst);
   920	
   921				dwc3_writel(dwc->regs, DWC3_GTXTHRCFG, reg);
   922			}
   923		}
   924	
   925		return 0;
   926	
   927	err4:
   928		phy_power_off(dwc->usb3_generic_phy);
   929	
   930	err3:
   931		phy_power_off(dwc->usb2_generic_phy);
   932	
   933	err2:
   934		usb_phy_set_suspend(dwc->usb2_phy, 1);
   935		usb_phy_set_suspend(dwc->usb3_phy, 1);
   936	
   937	err1:
   938		usb_phy_shutdown(dwc->usb2_phy);
   939		usb_phy_shutdown(dwc->usb3_phy);
   940		phy_exit(dwc->usb2_generic_phy);
   941		phy_exit(dwc->usb3_generic_phy);
   942	
   943	err0a:
   944		dwc3_ulpi_exit(dwc);
   945	
   946	err0:
   947		return ret;
   948	}
   949	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25258 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  3:34 [PATCH] usb: dwc3: call set incr burst type func() Pengbo Mu
  2018-07-23  5:16 ` Greg Kroah-Hartman
  2018-07-23  7:05 ` kbuild test robot
@ 2018-07-23  7:10 ` kbuild test robot
  2 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2018-07-23  7:10 UTC (permalink / raw)
  To: Pengbo Mu
  Cc: kbuild-all, Felipe Balbi, Greg Kroah-Hartman, linux-kernel,
	linux-usb, ran.wang_1, pengbo.mu

[-- Attachment #1: Type: text/plain, Size: 6334 bytes --]

Hi Pengbo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on balbi-usb/next]
[also build test ERROR on v4.18-rc6 next-20180720]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Pengbo-Mu/usb-dwc3-call-set-incr-burst-type-func/20180723-132027
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
config: x86_64-randconfig-x018-201829 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/usb//dwc3/core.c: In function 'dwc3_core_init':
>> drivers/usb//dwc3/core.c:843:2: error: implicit declaration of function 'dwc3_set_incr_burst_type'; did you mean 'dwc3_set_prtcap'? [-Werror=implicit-function-declaration]
     dwc3_set_incr_burst_type(dwc);
     ^~~~~~~~~~~~~~~~~~~~~~~~
     dwc3_set_prtcap
   cc1: some warnings being treated as errors

vim +843 drivers/usb//dwc3/core.c

   780	
   781	/**
   782	 * dwc3_core_init - Low-level initialization of DWC3 Core
   783	 * @dwc: Pointer to our controller context structure
   784	 *
   785	 * Returns 0 on success otherwise negative errno.
   786	 */
   787	static int dwc3_core_init(struct dwc3 *dwc)
   788	{
   789		u32			reg;
   790		int			ret;
   791	
   792		if (!dwc3_core_is_valid(dwc)) {
   793			dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n");
   794			ret = -ENODEV;
   795			goto err0;
   796		}
   797	
   798		/*
   799		 * Write Linux Version Code to our GUID register so it's easy to figure
   800		 * out which kernel version a bug was found.
   801		 */
   802		dwc3_writel(dwc->regs, DWC3_GUID, LINUX_VERSION_CODE);
   803	
   804		/* Handle USB2.0-only core configuration */
   805		if (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) ==
   806				DWC3_GHWPARAMS3_SSPHY_IFC_DIS) {
   807			if (dwc->maximum_speed == USB_SPEED_SUPER)
   808				dwc->maximum_speed = USB_SPEED_HIGH;
   809		}
   810	
   811		ret = dwc3_phy_setup(dwc);
   812		if (ret)
   813			goto err0;
   814	
   815		if (!dwc->ulpi_ready) {
   816			ret = dwc3_core_ulpi_init(dwc);
   817			if (ret)
   818				goto err0;
   819			dwc->ulpi_ready = true;
   820		}
   821	
   822		if (!dwc->phys_ready) {
   823			ret = dwc3_core_get_phy(dwc);
   824			if (ret)
   825				goto err0a;
   826			dwc->phys_ready = true;
   827		}
   828	
   829		ret = dwc3_core_soft_reset(dwc);
   830		if (ret)
   831			goto err0a;
   832	
   833		dwc3_core_setup_global_control(dwc);
   834		dwc3_core_num_eps(dwc);
   835	
   836		ret = dwc3_setup_scratch_buffers(dwc);
   837		if (ret)
   838			goto err1;
   839	
   840		/* Adjust Frame Length */
   841		dwc3_frame_length_adjustment(dwc);
   842	
 > 843		dwc3_set_incr_burst_type(dwc);
   844	
   845		usb_phy_set_suspend(dwc->usb2_phy, 0);
   846		usb_phy_set_suspend(dwc->usb3_phy, 0);
   847		ret = phy_power_on(dwc->usb2_generic_phy);
   848		if (ret < 0)
   849			goto err2;
   850	
   851		ret = phy_power_on(dwc->usb3_generic_phy);
   852		if (ret < 0)
   853			goto err3;
   854	
   855		ret = dwc3_event_buffers_setup(dwc);
   856		if (ret) {
   857			dev_err(dwc->dev, "failed to setup event buffers\n");
   858			goto err4;
   859		}
   860	
   861		/*
   862		 * ENDXFER polling is available on version 3.10a and later of
   863		 * the DWC_usb3 controller. It is NOT available in the
   864		 * DWC_usb31 controller.
   865		 */
   866		if (!dwc3_is_usb31(dwc) && dwc->revision >= DWC3_REVISION_310A) {
   867			reg = dwc3_readl(dwc->regs, DWC3_GUCTL2);
   868			reg |= DWC3_GUCTL2_RST_ACTBITLATER;
   869			dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
   870		}
   871	
   872		if (dwc->revision >= DWC3_REVISION_250A) {
   873			reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
   874	
   875			/*
   876			 * Enable hardware control of sending remote wakeup
   877			 * in HS when the device is in the L1 state.
   878			 */
   879			if (dwc->revision >= DWC3_REVISION_290A)
   880				reg |= DWC3_GUCTL1_DEV_L1_EXIT_BY_HW;
   881	
   882			if (dwc->dis_tx_ipgap_linecheck_quirk)
   883				reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS;
   884	
   885			dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
   886		}
   887	
   888		/*
   889		 * Must config both number of packets and max burst settings to enable
   890		 * RX and/or TX threshold.
   891		 */
   892		if (dwc3_is_usb31(dwc) && dwc->dr_mode == USB_DR_MODE_HOST) {
   893			u8 rx_thr_num = dwc->rx_thr_num_pkt_prd;
   894			u8 rx_maxburst = dwc->rx_max_burst_prd;
   895			u8 tx_thr_num = dwc->tx_thr_num_pkt_prd;
   896			u8 tx_maxburst = dwc->tx_max_burst_prd;
   897	
   898			if (rx_thr_num && rx_maxburst) {
   899				reg = dwc3_readl(dwc->regs, DWC3_GRXTHRCFG);
   900				reg |= DWC31_RXTHRNUMPKTSEL_PRD;
   901	
   902				reg &= ~DWC31_RXTHRNUMPKT_PRD(~0);
   903				reg |= DWC31_RXTHRNUMPKT_PRD(rx_thr_num);
   904	
   905				reg &= ~DWC31_MAXRXBURSTSIZE_PRD(~0);
   906				reg |= DWC31_MAXRXBURSTSIZE_PRD(rx_maxburst);
   907	
   908				dwc3_writel(dwc->regs, DWC3_GRXTHRCFG, reg);
   909			}
   910	
   911			if (tx_thr_num && tx_maxburst) {
   912				reg = dwc3_readl(dwc->regs, DWC3_GTXTHRCFG);
   913				reg |= DWC31_TXTHRNUMPKTSEL_PRD;
   914	
   915				reg &= ~DWC31_TXTHRNUMPKT_PRD(~0);
   916				reg |= DWC31_TXTHRNUMPKT_PRD(tx_thr_num);
   917	
   918				reg &= ~DWC31_MAXTXBURSTSIZE_PRD(~0);
   919				reg |= DWC31_MAXTXBURSTSIZE_PRD(tx_maxburst);
   920	
   921				dwc3_writel(dwc->regs, DWC3_GTXTHRCFG, reg);
   922			}
   923		}
   924	
   925		return 0;
   926	
   927	err4:
   928		phy_power_off(dwc->usb3_generic_phy);
   929	
   930	err3:
   931		phy_power_off(dwc->usb2_generic_phy);
   932	
   933	err2:
   934		usb_phy_set_suspend(dwc->usb2_phy, 1);
   935		usb_phy_set_suspend(dwc->usb3_phy, 1);
   936	
   937	err1:
   938		usb_phy_shutdown(dwc->usb2_phy);
   939		usb_phy_shutdown(dwc->usb3_phy);
   940		phy_exit(dwc->usb2_generic_phy);
   941		phy_exit(dwc->usb3_generic_phy);
   942	
   943	err0a:
   944		dwc3_ulpi_exit(dwc);
   945	
   946	err0:
   947		return ret;
   948	}
   949	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29792 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  7:05 ` kbuild test robot
@ 2018-07-23  9:29   ` Pengbo Mu
  2018-07-23 10:03     ` Felipe Balbi
  0 siblings, 1 reply; 12+ messages in thread
From: Pengbo Mu @ 2018-07-23  9:29 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Felipe Balbi, Greg Kroah-Hartman, linux-kernel,
	linux-usb, Ran Wang

Hi,

The following is my compile result:
  ...
  LD [M]  sound/soc/codecs/snd-soc-ak4613.ko
  LD [M]  sound/soc/generic/snd-soc-audio-graph-card.ko
  LD [M]  sound/soc/generic/snd-soc-simple-card-utils.ko
  LD [M]  sound/soc/generic/snd-soc-simple-card.ko
  LD [M]  sound/soc/sh/rcar/snd-soc-rcar.ko
ret:0
These patches are based on mainline , and my version is linux-4.18-rc5. Last week , I pulled my upstream branch to the latest.
I didn't see error log in this version.
By the way , this is my git tree --- git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git .
Please tell me which tree could suitably develop patch for upstream.

Thanks,
Pengbo Mu
 
-----Original Message-----
From: kbuild test robot [mailto:lkp@intel.com] 
Sent: 2018年7月23日 15:05
To: Pengbo Mu <pengbo.mu@nxp.com>
Cc: kbuild-all@01.org; Felipe Balbi <balbi@kernel.org>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org; Ran Wang <ran.wang_1@nxp.com>; Pengbo Mu <pengbo.mu@nxp.com>
Subject: Re: [PATCH] usb: dwc3: call set incr burst type func()

Hi Pengbo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on balbi-usb/next]
[also build test ERROR on v4.18-rc6 next-20180720]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2F0day-ci%2Flinux%2Fcommits%2FPengbo-Mu%2Fusb-dwc3-call-set-incr-burst-type-func%2F20180723-132027&amp;data=02%7C01%7Cpengbo.mu%40nxp.com%7Ce3094b6111134e37edc608d5f06ad541%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636679267258116308&amp;sdata=84XfOGT4V1urWs2F%2BSHaEZZWv4Tkl5rR9FgUc2jSW7c%3D&amp;reserved=0
base:   https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fbalbi%2Fusb.git&amp;data=02%7C01%7Cpengbo.mu%40nxp.com%7Ce3094b6111134e37edc608d5f06ad541%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636679267258116308&amp;sdata=R8LOzzVUFzlbEZ7tkNOoE%2FJ8Pji0G6ukbCuilctOQMw%3D&amp;reserved=0 next
config: i386-randconfig-s1-201829 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/usb/dwc3/core.c: In function 'dwc3_core_init':
>> drivers/usb/dwc3/core.c:843:2: error: implicit declaration of function 'dwc3_set_incr_burst_type' [-Werror=implicit-function-declaration]
     dwc3_set_incr_burst_type(dwc);
     ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/dwc3_set_incr_burst_type +843 drivers/usb/dwc3/core.c

   780	
   781	/**
   782	 * dwc3_core_init - Low-level initialization of DWC3 Core
   783	 * @dwc: Pointer to our controller context structure
   784	 *
   785	 * Returns 0 on success otherwise negative errno.
   786	 */
   787	static int dwc3_core_init(struct dwc3 *dwc)
   788	{
   789		u32			reg;
   790		int			ret;
   791	
   792		if (!dwc3_core_is_valid(dwc)) {
   793			dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n");
   794			ret = -ENODEV;
   795			goto err0;
   796		}
   797	
   798		/*
   799		 * Write Linux Version Code to our GUID register so it's easy to figure
   800		 * out which kernel version a bug was found.
   801		 */
   802		dwc3_writel(dwc->regs, DWC3_GUID, LINUX_VERSION_CODE);
   803	
   804		/* Handle USB2.0-only core configuration */
   805		if (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) ==
   806				DWC3_GHWPARAMS3_SSPHY_IFC_DIS) {
   807			if (dwc->maximum_speed == USB_SPEED_SUPER)
   808				dwc->maximum_speed = USB_SPEED_HIGH;
   809		}
   810	
   811		ret = dwc3_phy_setup(dwc);
   812		if (ret)
   813			goto err0;
   814	
   815		if (!dwc->ulpi_ready) {
   816			ret = dwc3_core_ulpi_init(dwc);
   817			if (ret)
   818				goto err0;
   819			dwc->ulpi_ready = true;
   820		}
   821	
   822		if (!dwc->phys_ready) {
   823			ret = dwc3_core_get_phy(dwc);
   824			if (ret)
   825				goto err0a;
   826			dwc->phys_ready = true;
   827		}
   828	
   829		ret = dwc3_core_soft_reset(dwc);
   830		if (ret)
   831			goto err0a;
   832	
   833		dwc3_core_setup_global_control(dwc);
   834		dwc3_core_num_eps(dwc);
   835	
   836		ret = dwc3_setup_scratch_buffers(dwc);
   837		if (ret)
   838			goto err1;
   839	
   840		/* Adjust Frame Length */
   841		dwc3_frame_length_adjustment(dwc);
   842	
 > 843		dwc3_set_incr_burst_type(dwc);
   844	
   845		usb_phy_set_suspend(dwc->usb2_phy, 0);
   846		usb_phy_set_suspend(dwc->usb3_phy, 0);
   847		ret = phy_power_on(dwc->usb2_generic_phy);
   848		if (ret < 0)
   849			goto err2;
   850	
   851		ret = phy_power_on(dwc->usb3_generic_phy);
   852		if (ret < 0)
   853			goto err3;
   854	
   855		ret = dwc3_event_buffers_setup(dwc);
   856		if (ret) {
   857			dev_err(dwc->dev, "failed to setup event buffers\n");
   858			goto err4;
   859		}
   860	
   861		/*
   862		 * ENDXFER polling is available on version 3.10a and later of
   863		 * the DWC_usb3 controller. It is NOT available in the
   864		 * DWC_usb31 controller.
   865		 */
   866		if (!dwc3_is_usb31(dwc) && dwc->revision >= DWC3_REVISION_310A) {
   867			reg = dwc3_readl(dwc->regs, DWC3_GUCTL2);
   868			reg |= DWC3_GUCTL2_RST_ACTBITLATER;
   869			dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
   870		}
   871	
   872		if (dwc->revision >= DWC3_REVISION_250A) {
   873			reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
   874	
   875			/*
   876			 * Enable hardware control of sending remote wakeup
   877			 * in HS when the device is in the L1 state.
   878			 */
   879			if (dwc->revision >= DWC3_REVISION_290A)
   880				reg |= DWC3_GUCTL1_DEV_L1_EXIT_BY_HW;
   881	
   882			if (dwc->dis_tx_ipgap_linecheck_quirk)
   883				reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS;
   884	
   885			dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
   886		}
   887	
   888		/*
   889		 * Must config both number of packets and max burst settings to enable
   890		 * RX and/or TX threshold.
   891		 */
   892		if (dwc3_is_usb31(dwc) && dwc->dr_mode == USB_DR_MODE_HOST) {
   893			u8 rx_thr_num = dwc->rx_thr_num_pkt_prd;
   894			u8 rx_maxburst = dwc->rx_max_burst_prd;
   895			u8 tx_thr_num = dwc->tx_thr_num_pkt_prd;
   896			u8 tx_maxburst = dwc->tx_max_burst_prd;
   897	
   898			if (rx_thr_num && rx_maxburst) {
   899				reg = dwc3_readl(dwc->regs, DWC3_GRXTHRCFG);
   900				reg |= DWC31_RXTHRNUMPKTSEL_PRD;
   901	
   902				reg &= ~DWC31_RXTHRNUMPKT_PRD(~0);
   903				reg |= DWC31_RXTHRNUMPKT_PRD(rx_thr_num);
   904	
   905				reg &= ~DWC31_MAXRXBURSTSIZE_PRD(~0);
   906				reg |= DWC31_MAXRXBURSTSIZE_PRD(rx_maxburst);
   907	
   908				dwc3_writel(dwc->regs, DWC3_GRXTHRCFG, reg);
   909			}
   910	
   911			if (tx_thr_num && tx_maxburst) {
   912				reg = dwc3_readl(dwc->regs, DWC3_GTXTHRCFG);
   913				reg |= DWC31_TXTHRNUMPKTSEL_PRD;
   914	
   915				reg &= ~DWC31_TXTHRNUMPKT_PRD(~0);
   916				reg |= DWC31_TXTHRNUMPKT_PRD(tx_thr_num);
   917	
   918				reg &= ~DWC31_MAXTXBURSTSIZE_PRD(~0);
   919				reg |= DWC31_MAXTXBURSTSIZE_PRD(tx_maxburst);
   920	
   921				dwc3_writel(dwc->regs, DWC3_GTXTHRCFG, reg);
   922			}
   923		}
   924	
   925		return 0;
   926	
   927	err4:
   928		phy_power_off(dwc->usb3_generic_phy);
   929	
   930	err3:
   931		phy_power_off(dwc->usb2_generic_phy);
   932	
   933	err2:
   934		usb_phy_set_suspend(dwc->usb2_phy, 1);
   935		usb_phy_set_suspend(dwc->usb3_phy, 1);
   936	
   937	err1:
   938		usb_phy_shutdown(dwc->usb2_phy);
   939		usb_phy_shutdown(dwc->usb3_phy);
   940		phy_exit(dwc->usb2_generic_phy);
   941		phy_exit(dwc->usb3_generic_phy);
   942	
   943	err0a:
   944		dwc3_ulpi_exit(dwc);
   945	
   946	err0:
   947		return ret;
   948	}
   949	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01.org%2Fpipermail%2Fkbuild-all&amp;data=02%7C01%7Cpengbo.mu%40nxp.com%7Ce3094b6111134e37edc608d5f06ad541%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636679267258116308&amp;sdata=K6eL5vifht2%2FkRHaW0sFIJtPPBn7VvQcYclcY7Z7ESU%3D&amp;reserved=0                   Intel Corporation

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  9:29   ` Pengbo Mu
@ 2018-07-23 10:03     ` Felipe Balbi
  2018-07-23 10:35       ` Pengbo Mu
  0 siblings, 1 reply; 12+ messages in thread
From: Felipe Balbi @ 2018-07-23 10:03 UTC (permalink / raw)
  To: Pengbo Mu, kbuild test robot
  Cc: kbuild-all, Greg Kroah-Hartman, linux-kernel, linux-usb, Ran Wang

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]


Hi,

(no top-posting)

Pengbo Mu <pengbo.mu@nxp.com> writes:
> Hi,
>
> The following is my compile result:
>   ...
>   LD [M]  sound/soc/codecs/snd-soc-ak4613.ko
>   LD [M]  sound/soc/generic/snd-soc-audio-graph-card.ko
>   LD [M]  sound/soc/generic/snd-soc-simple-card-utils.ko
>   LD [M]  sound/soc/generic/snd-soc-simple-card.ko
>   LD [M]  sound/soc/sh/rcar/snd-soc-rcar.ko
> ret:0
> These patches are based on mainline , and my version is linux-4.18-rc5. Last week , I pulled my upstream branch to the latest.
> I didn't see error log in this version.
> By the way , this is my git tree --- git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git .
> Please tell me which tree could suitably develop patch for upstream.

this is a result of you sending this patch outside of the series it
belongs to. Just resend the full series and things should be okay. Also,
as Greg already mentioned, please write changelogs that explain WHY the
change was made.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23 10:03     ` Felipe Balbi
@ 2018-07-23 10:35       ` Pengbo Mu
  0 siblings, 0 replies; 12+ messages in thread
From: Pengbo Mu @ 2018-07-23 10:35 UTC (permalink / raw)
  To: Felipe Balbi, kbuild test robot
  Cc: kbuild-all, Greg Kroah-Hartman, linux-kernel, linux-usb, Ran Wang

Roger that.
I have sent the full series. Please review.

Thanks,
Pengbo
-----Original Message-----
From: Felipe Balbi [mailto:balbi@kernel.org] 
Sent: 2018年7月23日 18:04
To: Pengbo Mu <pengbo.mu@nxp.com>; kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org; Ran Wang <ran.wang_1@nxp.com>
Subject: RE: [PATCH] usb: dwc3: call set incr burst type func()


Hi,

(no top-posting)

Pengbo Mu <pengbo.mu@nxp.com> writes:
> Hi,
>
> The following is my compile result:
>   ...
>   LD [M]  sound/soc/codecs/snd-soc-ak4613.ko
>   LD [M]  sound/soc/generic/snd-soc-audio-graph-card.ko
>   LD [M]  sound/soc/generic/snd-soc-simple-card-utils.ko
>   LD [M]  sound/soc/generic/snd-soc-simple-card.ko
>   LD [M]  sound/soc/sh/rcar/snd-soc-rcar.ko
> ret:0
> These patches are based on mainline , and my version is linux-4.18-rc5. Last week , I pulled my upstream branch to the latest.
> I didn't see error log in this version.
> By the way , this is my git tree --- git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git .
> Please tell me which tree could suitably develop patch for upstream.

this is a result of you sending this patch outside of the series it belongs to. Just resend the full series and things should be okay. Also, as Greg already mentioned, please write changelogs that explain WHY the change was made.

--
balbi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  7:00 ` Greg Kroah-Hartman
@ 2018-07-23  7:48   ` Pengbo Mu
  0 siblings, 0 replies; 12+ messages in thread
From: Pengbo Mu @ 2018-07-23  7:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Felipe Balbi, linux-kernel, linux-usb, Ran Wang

I have realized this will cause confusion.
Will remake it !

Thanks,
Pengbo Mu
-----Original Message-----
From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org] 
Sent: 2018年7月23日 15:00
To: Pengbo Mu <pengbo.mu@nxp.com>
Cc: Felipe Balbi <balbi@kernel.org>; linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org; Ran Wang <ran.wang_1@nxp.com>
Subject: Re: [PATCH] usb: dwc3: call set incr burst type func()

On Mon, Jul 23, 2018 at 02:40:57PM +0800, Pengbo Mu wrote:
> Calling dwc3_set_incr_burst_type() in dwc3_core_init().
> This function enabled the undefined length INCR burst type and set 
> INCRx. Different platform may has the different burst size type. In 
> order to get best performance, we need to tune the burst size to one 
> special value, instead of the default value.
> 
> Signed-off-by: Pengbo Mu <pengbo.mu@nxp.com>
> ---
> Changes in v1:
>  - add the calling of dwc3_set_incr_burst_type.

This isn't the changelog :(  You also didn't version the patch in the [PATCH] area :(

Please put this as part of the other series properly.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] usb: dwc3: call set incr burst type func()
  2018-07-23  6:40 Pengbo Mu
@ 2018-07-23  7:00 ` Greg Kroah-Hartman
  2018-07-23  7:48   ` Pengbo Mu
  0 siblings, 1 reply; 12+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-23  7:00 UTC (permalink / raw)
  To: Pengbo Mu; +Cc: Felipe Balbi, linux-kernel, linux-usb, ran.wang_1

On Mon, Jul 23, 2018 at 02:40:57PM +0800, Pengbo Mu wrote:
> Calling dwc3_set_incr_burst_type() in dwc3_core_init().
> This function enabled the undefined length INCR burst type and
> set INCRx. Different platform may has the different burst size
> type. In order to get best performance, we need to tune the burst
> size to one special value, instead of the default value.
> 
> Signed-off-by: Pengbo Mu <pengbo.mu@nxp.com>
> ---
> Changes in v1:
>  - add the calling of dwc3_set_incr_burst_type.

This isn't the changelog :(  You also didn't version the patch in the
[PATCH] area :(

Please put this as part of the other series properly.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] usb: dwc3: call set incr burst type func()
@ 2018-07-23  6:40 Pengbo Mu
  2018-07-23  7:00 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 12+ messages in thread
From: Pengbo Mu @ 2018-07-23  6:40 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-kernel, linux-usb, ran.wang_1, pengbo.mu

Calling dwc3_set_incr_burst_type() in dwc3_core_init().
This function enabled the undefined length INCR burst type and
set INCRx. Different platform may has the different burst size
type. In order to get best performance, we need to tune the burst
size to one special value, instead of the default value.

Signed-off-by: Pengbo Mu <pengbo.mu@nxp.com>
---
Changes in v1:
 - add the calling of dwc3_set_incr_burst_type.
---
 drivers/usb/dwc3/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 29df9e8..21e4931 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -932,6 +932,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
 	/* Adjust Frame Length */
 	dwc3_frame_length_adjustment(dwc);
 
+	dwc3_set_incr_burst_type(dwc);
+
 	usb_phy_set_suspend(dwc->usb2_phy, 0);
 	usb_phy_set_suspend(dwc->usb3_phy, 0);
 	ret = phy_power_on(dwc->usb2_generic_phy);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-23 10:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-23  3:34 [PATCH] usb: dwc3: call set incr burst type func() Pengbo Mu
2018-07-23  5:16 ` Greg Kroah-Hartman
2018-07-23  6:37   ` Pengbo Mu
2018-07-23  6:59     ` Greg Kroah-Hartman
2018-07-23  7:05 ` kbuild test robot
2018-07-23  9:29   ` Pengbo Mu
2018-07-23 10:03     ` Felipe Balbi
2018-07-23 10:35       ` Pengbo Mu
2018-07-23  7:10 ` kbuild test robot
2018-07-23  6:40 Pengbo Mu
2018-07-23  7:00 ` Greg Kroah-Hartman
2018-07-23  7:48   ` Pengbo Mu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).