usb: dwc2: Turn on uframe sched everywhere
Subsystems (2)
cover usb: dwc2: Turn on uframe sched everywhere
While looking at a dwc2 recently, I noticed that some platforms still have the uframe scheduler off. As far as I know, nothing good can come out of having the uframe scheduler off. Let's turn it on everywhere. Assuming this all works out then some time in the future we can gut all the old code that handles the old non-uframe scheduler and make everything simpler.
NOTE: I don't have access to any of the platforms that I'm changing here, so I'm hoping to see a Tested-by from those on the list.
Douglas Anderson (4):
usb: dwc2: Turn on uframe_sched on "bcm" platforms
usb: dwc2: Turn on uframe_sched on "his" platforms
usb: dwc2: Turn on uframe_sched on "amlogic" platforms
usb: dwc2: Turn on uframe_sched on "stm32f4x9_fsotg" platforms
drivers/usb/dwc2/params.c | 4 ---- 1 file changed, 4 deletions(-)
Signature · 1 line
2.18.0.399.gad0ab374a1-goog
PATCH 1/4 usb: dwc2: Turn on uframe_sched on "bcm" platforms
There's no reason to have the uframe scheduler off on dwc2. Running with uframe_sched = False is equivalent to saying "I don't want to run the correct code, I want to run the old and incorrect code".
The uframe scheduler has been off on Broadcom since commit 58b179dcf28c ("staging: dwc2: disable uframe_sched on the bcm2835"). Since then there have been many many improvements, notably the commit 9f9f09b048f5 ("usb: dwc2: host: Totally redo the microframe scheduler")
Presumably if everyone is good w/ the uframe_sched turned back on we can kill all the old and crufty non-uframe sched code.
---
drivers/usb/dwc2/params.c | 1 - 1 file changed, 1 deletion(-)
drivers/usb/dwc2/params.c +0 -1
@@ -47,7 +47,6 @@ static void dwc2_set_bcm_params(struct dwc2_hsotg *hsotg) p->max_transfer_size =65535 ; p->max_packet_count =511 ; p->ahbcfg =0x10 ; - p->uframe_sched = false; }static void dwc2_set_his_params (struct dwc2_hsotg *hsotg)
PATCH 2/4 usb: dwc2: Turn on uframe_sched on "his" platforms
In reply to Douglas AndersonThere's no reason to have the uframe scheduler off on dwc2. Running with uframe_sched = False is equivalent to saying "I don't want to run the correct code, I want to run the old and incorrect code".
The uframe scheduler has been off on HiSilicon since commit 37dd9d65cc41 ("usb: dwc2: add support of hi6220"). Since then there have been many many improvements, notably the commit 9f9f09b048f5 ("usb: dwc2: host: Totally redo the microframe scheduler")
Presumably if everyone is good w/ the uframe_sched turned back on we can kill all the old and crufty non-uframe sched code.
---
drivers/usb/dwc2/params.c | 1 - 1 file changed, 1 deletion(-)
drivers/usb/dwc2/params.c +0 -1
@@ -67,7 +67,6 @@ static void dwc2_set_his_params(struct dwc2_hsotg *hsotg) p->reload_ctl = false; p->ahbcfg =GAHBCFG_HBSTLEN_INCR16 <<GAHBCFG_HBSTLEN_SHIFT ; - p->uframe_sched = false; p->change_speed_quirk = true; p->power_down = false; }
Re: [RFT PATCH 2/4] usb: dwc2: Turn on uframe_sched on "his" platforms
Quoted 9 lines · Douglas Anderson
There's no reason to have the uframe scheduler off on dwc2. Running with
uframe_sched= False is equivalent to saying "I don't want to run the correct code, I want to run the old and incorrect code".The uframe scheduler has been off on HiSilicon since commit
37dd9d65cc41("usb: dwc2: add support of hi6220"). Since then there have been many many improvements, notably the commit9f9f09b048f5("usb: dwc2: host: Totally redo the microframe scheduler")
Quoted 4 lines
Presumably if everyone is good w/ the
uframe_schedturned back on we can kill all the old and crufty non-uframe sched code.Signed-off-by Douglas Anderson <[email protected]>
Not sure exactly how to exercise this, but in my initial testing with usb on HiKey, this seems to work ok.
thanks
-john
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/4 usb: dwc2: Turn on uframe_sched on "amlogic" platforms
In reply to Douglas AndersonThere's no reason to have the uframe scheduler off on dwc2. Running with uframe_sched = False is equivalent to saying "I don't want to run the correct code, I want to run the old and incorrect code".
The uframe scheduler has been off on Amlogic since commit f94310ac076e ("usb: dwc2: add support for Meson8b and GXBB SoCs"). While this was after most of the recent improvements, notably the commit 9f9f09b048f5 ("usb: dwc2: host: Totally redo the microframe scheduler"), presumably the parameters were copied from another platform and the uframe scheduler wasn't tried.
Presumably if everyone is good w/ the uframe_sched turned back on we can kill all the old and crufty non-uframe sched code.
---
drivers/usb/dwc2/params.c | 1 - 1 file changed, 1 deletion(-)
drivers/usb/dwc2/params.c +0 -1
@@ -110,7 +110,6 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg) p->phy_type =DWC2_PHY_TYPE_PARAM_UTMI ; p->ahbcfg =GAHBCFG_HBSTLEN_INCR8 <<GAHBCFG_HBSTLEN_SHIFT ; - p->uframe_sched = false; }static void dwc2_set_amcc_params (struct dwc2_hsotg *hsotg)
PATCH 4/4 usb: dwc2: Turn on uframe_sched on "stm32f4x9_fsotg" platforms
In reply to Douglas AndersonThere's no reason to have the uframe scheduler off on dwc2. Running with uframe_sched = False is equivalent to saying "I don't want to run the correct code, I want to run the old and incorrect code".
The uframe scheduler has been off on stm32f4x9_fsotg since commit e35b135055e2 ("usb: dwc2: Add support for STM32F429/439/469 USB OTG HS/FS in FS mode (internal PHY)"). That commit is pretty recent, so it's unclear to me why the uframe scheduler was left off. Hopefully it's because someone copied it from other parameters and didn't think to try it?
Presumably if everyone is good w/ the uframe_sched turned back on we can kill all the old and crufty non-uframe sched code.
---
drivers/usb/dwc2/params.c | 1 - 1 file changed, 1 deletion(-)
drivers/usb/dwc2/params.c +0 -1
@@ -131,7 +131,6 @@ static void dwc2_set_stm32f4x9_fsotg_params(struct dwc2_hsotg *hsotg) p->max_packet_count =256 ; p->phy_type =DWC2_PHY_TYPE_PARAM_FS ; p->i2c_enable = false; - p->uframe_sched = false; p->activate_stm_fs_transceiver = true; }
Quoted 11 lines · Douglas Anderson
While looking at a dwc2 recently, I noticed that some platforms still have the uframe scheduler off. As far as I know, nothing good can come out of having the uframe scheduler off. Let's turn it on everywhere. Assuming this all works out then some time in the future we can gut all the old code that handles the old non-uframe scheduler and make everything simpler.
NOTE: I don't have access to any of the platforms that I'm changing here, so I'm hoping to see a Tested-by from those on the list.
Quoted 5 lines
Douglas Anderson (4):
usb: dwc2: Turn onuframe_schedon "bcm" platforms
usb: dwc2: Turn onuframe_schedon "his" platforms
usb: dwc2: Turn onuframe_schedon "amlogic" platforms
usb: dwc2: Turn onuframe_schedon "stm32f4x9_fsotg" platforms
care to resend without RFT prefix and with collected acks, tested-bys, etc?
Signature · 1 line
balbi
Hi,
Quoted 13 lines · Felipe Balbi
Quoted 11 lines · Douglas Anderson
While looking at a dwc2 recently, I noticed that some platforms still have the uframe scheduler off. As far as I know, nothing good can come out of having the uframe scheduler off. Let's turn it on everywhere. Assuming this all works out then some time in the future we can gut all the old code that handles the old non-uframe scheduler and make everything simpler.
NOTE: I don't have access to any of the platforms that I'm changing here, so I'm hoping to see a Tested-by from those on the list.
Quoted 7 lines
Quoted 5 lines
Douglas Anderson (4):
usb: dwc2: Turn onuframe_schedon "bcm" platforms
usb: dwc2: Turn onuframe_schedon "his" platforms
usb: dwc2: Turn onuframe_schedon "amlogic" platforms
usb: dwc2: Turn onuframe_schedon "stm32f4x9_fsotg" platformscare to resend without RFT prefix and with collected acks, tested-bys, etc?
Done with a prefix of 'REPOST' to hopefully make it obvious nothing changed between the RFT and this version. There were only two test-by, but as mentioned in the updated cover letter:
Since there should be nothing platform specific about the uFrame scheduler presumably this should mean we're good to go? Specificaly note that in at least one of the "Tested-by" reports this patch caused a notable improvement.
BTW: I'm pleased to have you apply the patches, but I notice that get_maintainer no longer flags you as the person to post dwc2 patches to. From linux-next:
$ ./scripts/get_maintainer.pl -f drivers/usb/dwc2 Minas Harutyunyan <[email protected]> (maintainer:DESIGNWARE USB2 DRD IP DRIVER) Greg Kroah-Hartman <[email protected]> (supporter:USB SUBSYSTEM) [email protected] (open list:DESIGNWARE USB2 DRD IP DRIVER) [email protected] (open list)
-Doug
Hi,
Quoted 37 lines · Doug Anderson
Quoted 13 lines · Felipe Balbi
Quoted 11 lines · Douglas Anderson
While looking at a dwc2 recently, I noticed that some platforms still have the uframe scheduler off. As far as I know, nothing good can come out of having the uframe scheduler off. Let's turn it on everywhere. Assuming this all works out then some time in the future we can gut all the old code that handles the old non-uframe scheduler and make everything simpler.
NOTE: I don't have access to any of the platforms that I'm changing here, so I'm hoping to see a Tested-by from those on the list.
Quoted 7 lines
Quoted 5 lines
Douglas Anderson (4):
usb: dwc2: Turn onuframe_schedon "bcm" platforms
usb: dwc2: Turn onuframe_schedon "his" platforms
usb: dwc2: Turn onuframe_schedon "amlogic" platforms
usb: dwc2: Turn onuframe_schedon "stm32f4x9_fsotg" platformscare to resend without RFT prefix and with collected acks, tested-bys, etc?
Done with a prefix of 'REPOST' to hopefully make it obvious nothing changed between the RFT and this version. There were only two test-by, but as mentioned in the updated cover letter:
Since there should be nothing platform specific about the uFrame scheduler presumably this should mean we're good to go? Specificaly note that in at least one of the "Tested-by" reports this patch caused a notable improvement.
BTW: I'm pleased to have you apply the patches, but I notice that
get_maintainerno longer flags you as the person to post dwc2 patches to. From linux-next:
Quoted 6 lines
$ ./scripts/get_maintainer.pl -f drivers/usb/dwc2 Minas Harutyunyan <[email protected]> (maintainer:DESIGNWARE USB2 DRD IP DRIVER) Greg Kroah-Hartman <[email protected]> (supporter:USB SUBSYSTEM) [email protected] (open list:DESIGNWARE USB2 DRD IP DRIVER) [email protected] (open list)
I need to add dwc2 to the gadget framework part of MAINTAINERS. I'll do that at some point.
Signature · 1 line
balbi