-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bl808/usb upgrade fotg210 #3
base: bl808/board
Are you sure you want to change the base?
Bl808/usb upgrade fotg210 #3
Conversation
Add bindings doc for Bouffalolab UART Driver Signed-off-by: Jisheng Zhang <[email protected]>
The Bouffalolab bl808 SoC contains three riscv CPUs, namely M0, D0 and LP. The D0 is 64bit RISC-V GC compatible, so can run linux. Signed-off-by: Jisheng Zhang <[email protected]>
Add a baisc dtsi for the bouffalolab bl808 SoC. Signed-off-by: Jisheng Zhang <[email protected]>
Sipeed manufactures a M1S system-on-module and dock board, add basic support for them. Signed-off-by: Jisheng Zhang <[email protected]>
I want to maintain this Bouffalolab riscv SoC entry from now on. Signed-off-by: Jisheng Zhang <[email protected]>
ehci controller registers are at address 0x20072000 not 0x20072010
Pinmux for this device conflicts with EMAC, so disable it until pinmux is changed to some other pins.
Add device-tree node for EMAC ethernet device and fake clock node to represent 50MHz clock to the device. Add a virtualized interrupt bit for forwareded EMAC interrupts.
The number of address cells needed here (one) does not match the implicitly-defined default number of cells. Signed-off-by: Samuel Holland <[email protected]>
The number of address cells needed here (one) does not match the implicitly-defined default number of cells. Signed-off-by: Allen Martin <[email protected]>
…string on the Ox64 device tree
Remove mainline fotg210 driver and replace with more updated driver from faraday semiconductor found at https://github.com/FaradayA380Platform/Linux.git . All code here is authored by Faraday Semiconductor and released under their terms.
Patches to make faraday authored fotg210 drivers for 5.10 work on linux 6.2
DTS changes.
Minimal enable of USB drivers. Only turn on host and peripheral drivers.
Usb configuration with useful host and gadget drivers, so that normally expected devices work out of the box.
Is this actually "stable"? I kept seeing in the chat that it dies after 2-3Mb's of traffic? or was that the u-boot implementation? |
My initial tests were just running
|
I managed to get the mainstream driver working too and it has the same issue. anything under around ~2Mb works fine, and can do repeated transfers. but anything bigger will get stuck around ~3Mb mark. I narrowed it down to an interrupt issue. Once the fifo has some data, the controller should fire an interrupt to let the driver know that it can read data, sometimes controller will set all the other registers to show that there is some data in a fifo but the interrupt doesn't come. |
KASAN reported: [ 9793.708867] BUG: KASAN: global-out-of-bounds in ice_get_link_speed+0x16/0x30 [ice] [ 9793.709205] Read of size 4 at addr ffffffffc1271b1c by task kworker/6:1/402 [ 9793.709222] CPU: 6 PID: 402 Comm: kworker/6:1 Kdump: loaded Tainted: G B OE 6.1.0+ #3 [ 9793.709235] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.00.01.0014.070920180847 07/09/2018 [ 9793.709245] Workqueue: ice ice_service_task [ice] [ 9793.709575] Call Trace: [ 9793.709582] <TASK> [ 9793.709588] dump_stack_lvl+0x44/0x5c [ 9793.709613] print_report+0x17f/0x47b [ 9793.709632] ? __cpuidle_text_end+0x5/0x5 [ 9793.709653] ? ice_get_link_speed+0x16/0x30 [ice] [ 9793.709986] ? ice_get_link_speed+0x16/0x30 [ice] [ 9793.710317] kasan_report+0xb7/0x140 [ 9793.710335] ? ice_get_link_speed+0x16/0x30 [ice] [ 9793.710673] ice_get_link_speed+0x16/0x30 [ice] [ 9793.711006] ice_vc_notify_vf_link_state+0x14c/0x160 [ice] [ 9793.711351] ? ice_vc_repr_cfg_promiscuous_mode+0x120/0x120 [ice] [ 9793.711698] ice_vc_process_vf_msg+0x7a7/0xc00 [ice] [ 9793.712074] __ice_clean_ctrlq+0x98f/0xd20 [ice] [ 9793.712534] ? ice_bridge_setlink+0x410/0x410 [ice] [ 9793.712979] ? __request_module+0x320/0x520 [ 9793.713014] ? ice_process_vflr_event+0x27/0x130 [ice] [ 9793.713489] ice_service_task+0x11cf/0x1950 [ice] [ 9793.713948] ? io_schedule_timeout+0xb0/0xb0 [ 9793.713972] process_one_work+0x3d0/0x6a0 [ 9793.714003] worker_thread+0x8a/0x610 [ 9793.714031] ? process_one_work+0x6a0/0x6a0 [ 9793.714049] kthread+0x164/0x1a0 [ 9793.714071] ? kthread_complete_and_exit+0x20/0x20 [ 9793.714100] ret_from_fork+0x1f/0x30 [ 9793.714137] </TASK> [ 9793.714151] The buggy address belongs to the variable: [ 9793.714158] ice_aq_to_link_speed+0x3c/0xffffffffffff3520 [ice] [ 9793.714632] Memory state around the buggy address: [ 9793.714642] ffffffffc1271a00: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 00 02 f9 [ 9793.714656] ffffffffc1271a80: f9 f9 f9 f9 00 00 04 f9 f9 f9 f9 f9 00 00 00 00 [ 9793.714670] >ffffffffc1271b00: 00 00 00 04 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 [ 9793.714680] ^ [ 9793.714690] ffffffffc1271b80: 00 00 00 00 00 04 f9 f9 f9 f9 f9 f9 00 00 00 00 [ 9793.714704] ffffffffc1271c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 The ICE_AQ_LINK_SPEED_UNKNOWN define is BIT(15). The value is bigger than both legacy and normal link speed tables. Add one element (0 - unknown) to both tables. There is no need to explicitly set table size, leave it empty. Fixes: 1d0e28a ("ice: Remove and replace ice speed defines with ethtool.h versions") Signed-off-by: Michal Swiatkowski <[email protected]> Reviewed-by: Alexander Lobakin <[email protected]> Tested-by: Gurucharan G <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>
Jakub Sitnicki says: ==================== This patch set addresses the syzbot report in [1]. Patch #1 has been suggested by Eric [2]. I extended it to cover the rest of sock_map proto callbacks. Otherwise we would still overflow the stack. Patch #2 contains the actual fix and bug analysis. Patches #3 & #4 add coverage to selftests to trigger the bug. [1] https://lore.kernel.org/all/[email protected]/ [2] https://lore.kernel.org/all/CANn89iK2UN1FmdUcH12fv_xiZkv2G+Nskvmq7fG6aA_6VKRf6g@mail.gmail.com/ --- v1 -> v2: v1: https://lore.kernel.org/r/[email protected] [v1 didn't hit bpf@ ML by mistake] * pull in Eric's patch to protect against recursion loop bugs (Eric) * add a macro helper to check if pointer is inside a memory range (Eric) ==================== Signed-off-by: Alexei Starovoitov <[email protected]>
…kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.2, take #3 - Yet another fix for non-CPU accesses to the memory backing the VGICv3 subsystem - A set of fixes for the setlftest checking for the S1PTW behaviour after the fix that went in ealier in the cycle
in the IRQ forwarder - When we get a interupt, we disable that interupt, send it off to D0 and wait for a EOI intertupt back (which happens after the IRQ hander runs on linux) then re-enable the interupt what might be happening is a USB interupt is fired while we are pending a EOI from linux (and thus masked). Two things you could try: |
(note - Both potentially could introduce a race condition into the IRQ forwarding, so a proper solution needs to be implemented if this does fix your issues) |
Looks like the 2nd trick solves it. I was able to push/pull 100Mb file with it. |
A good candidate to test once the new IRQ driver is in then? |
I did a buildroot build with the discussed OBLFR hack to make it easier for people to test. It is available here: https://github.com/grant-olson/buildroot_bouffalo/releases/tag/usb_gadget-beta2 So far I'm able to send large 100 Mb files with either zmodem or This also seems to resolve a problem I would see when using the ethernet gadget where it wouldn't die like we see during a file transfer, but would 'flap' and disconnect and reconnect from the host machine. I now get a good solid software ethernet connection. |
When the dwc3 device is runtime suspended, various required clocks are in disabled state and it is not guaranteed that access to any registers would work. Depending on the SoC glue, a register read could be as benign as returning 0 or be fatal enough to hang the system. In order to prevent such scenarios of fatal errors, make sure to resume dwc3 then allow the function to proceed. Fixes: 72246da ("usb: Introduce DesignWare USB3 DRD Driver") Cc: [email protected] #3.2: 30332ee: debugfs: regset32: Add Runtime PM support Signed-off-by: Udipto Goswami <[email protected]> Reviewed-by: Johan Hovold <[email protected]> Tested-by: Johan Hovold <[email protected]> Acked-by: Thinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This upgrades the drivers for the USB IP used by the BL808. The new drivers were primarily written by Faraday Semiconductor and are available at https://github.com/FaradayA380Platform/Linux This PR just ports over these and makes required changes for them to work on linux 6.2.
There is a set of 5 patches:
This patch will not physically power up the USB as that happens in the BL808 PDS subsystem. The code to power up the USB is included in the current version of OBLFR, but needs to be enabled in the OBLFR config for the device to work.
We implement both HDC (host) and UCD (peripheral) modes. However HDC/host mode suffers the same problems we are seeing on the bare metal SDK implementation, recorded as Issue 65 in the SDK repo. I think it's working as well as can be expected until Bouffalo provides a fix. Because of this we enable UCD/peripheral mode by default.
To test you'll need to load a USB gadget which determines the mode we use for a USB peripheral. An script with several examples of working gadgets is available here: https://github.com/grant-olson/buildroot_bouffalo/blob/usb_gadgets/board/pine64/ox64/rootfs-overlay/etc/init.d/S70gadgets