Activity log for bug #1861070

Date Who What changed Old value New value Message
2020-01-28 07:50:13 Enoch Leung bug added bug
2020-01-28 09:11:38 Hui Wang linux-raspi2 (Ubuntu): assignee Hui Wang (hui.wang)
2020-01-28 09:11:42 Hui Wang linux-raspi2 (Ubuntu): importance Undecided High
2020-01-29 14:25:27 Enoch Leung attachment added dmesgs.tgz https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+attachment/5323811/+files/dmesgs.tgz
2020-02-07 13:50:00 Hui Wang linux-raspi2 (Ubuntu): status New Triaged
2020-02-10 02:35:49 Hui Wang description I am using Raspberry Pi 4B (4GB) and want to make use of the OTG functionality (g_ether). I cross checked with Raspbian to make sure it is not a hardware issue. Extract from dmesg of Ubuntu 19.10.1 with latest updates applied as of Jan 26th, 2020 via "apt-get update" and "apt-get full-upgrade": ... [ 1.514262] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 1.517365] dwc_otg: FIQ enabled [ 1.517376] dwc_otg: NAK holdoff enabled [ 1.517386] dwc_otg: FIQ split-transaction FSM enabled [ 1.517399] Module dwc_common_port init ... [ 6.358332] dwc2 fe980000.usb: fe980000.usb supply vusb_d not found, using dummy regulator [ 6.358388] dwc2 fe980000.usb: fe980000.usb supply vusb_a not found, using dummy regulator [ 6.358545] dwc2 fe980000.usb: Configuration mismatch. dr_mode forced to host [ 6.409098] dwc2 fe980000.usb: DWC OTG Controller [ 6.409399] dwc2 fe980000.usb: new USB bus registered, assigned bus number 3 [ 6.409432] dwc2 fe980000.usb: irq 23, io mem 0xfe980000 ... [ 111.796714] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers I think it is that "Configuration mismatch. dr_mode forced to host" log entry telling me that the port is acting as HOST mode instead of OTG mode. I have try putting these in usercfg.txt "dtoverlay=dwc2" "dtoverlay=dwc2,dr_mode=otg" "dtoverlay=dwc2,dr_mode=peripheral" and it will give the same result, no OTG functionality. On the same hardware running Raspbian Buster, it initialise successfully. Corresponding dmesg: ... [ 0.567531] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 0.570391] dwc_otg: FIQ enabled [ 0.570400] dwc_otg: NAK holdoff enabled [ 0.570409] dwc_otg: FIQ split-transaction FSM enabled [ 0.570421] Module dwc_common_port init ... [ 2.507634] dwc2 fe980000.usb: fe980000.usb supply vusb_d not found, using dummy regulator [ 2.511011] dwc2 fe980000.usb: Linked as a consumer to regulator.0 [ 2.514450] dwc2 fe980000.usb: fe980000.usb supply vusb_a not found, using dummy regulator [ 2.731860] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter lpm=1 [ 2.735511] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter lpm_clock_gating=1 [ 2.735522] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter besl=1 [ 2.735533] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter hird_threshold_en=1 [ 2.735582] dwc2 fe980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM [ 2.752511] dwc2 fe980000.usb: DWC OTG Controller [ 2.752554] dwc2 fe980000.usb: new USB bus registered, assigned bus number 3 [ 2.752601] dwc2 fe980000.usb: irq 36, io mem 0xfe980000 ... [ 2.848843] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 [ 2.851601] g_ether gadget: g_ether ready [ 2.854580] dwc2 fe980000.usb: bound driver g_ether [ 2.998525] dwc2 fe980000.usb: new device is high-speed [ 3.075025] dwc2 fe980000.usb: new device is high-speed [ 3.139338] dwc2 fe980000.usb: new address 10 [ 3.154010] g_ether gadget: high-speed config #1: CDC Ethernet (ECM) [Impact] On the RPI4B board, the usb-c power port could also work as a USB OTG mode, but we set the dwc2 driver to the host mode unconditionally, now set it to dual_role mode, then it could work in host/otg/peripheal mode. [Fix] Set USB_DWC2_DUAL_ROLE=y, USB_DWC2_HOST=n [Test Case] set the dtoverlay=dwc2,dr_mode=[otg|peripheral] in the config.txt, and isnmod the g_ether or g_cdc, on the host machine, we could see RPI4B work as a usb device. Because physical port limitation, could test dr_mode=host. [Regression Risk] Low, our eoan kernel choose dwc_otg driver for this port by default, very very few users will choose dwc2 driver, and the dwc2 driver is not enabled by default in our kernel. And bug reporter and I already tested that the peripheral mode works after this change. I am using Raspberry Pi 4B (4GB) and want to make use of the OTG functionality (g_ether). I cross checked with Raspbian to make sure it is not a hardware issue. Extract from dmesg of Ubuntu 19.10.1 with latest updates applied as of Jan 26th, 2020 via "apt-get update" and "apt-get full-upgrade": ... [ 1.514262] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 1.517365] dwc_otg: FIQ enabled [ 1.517376] dwc_otg: NAK holdoff enabled [ 1.517386] dwc_otg: FIQ split-transaction FSM enabled [ 1.517399] Module dwc_common_port init ... [ 6.358332] dwc2 fe980000.usb: fe980000.usb supply vusb_d not found, using dummy regulator [ 6.358388] dwc2 fe980000.usb: fe980000.usb supply vusb_a not found, using dummy regulator [ 6.358545] dwc2 fe980000.usb: Configuration mismatch. dr_mode forced to host [ 6.409098] dwc2 fe980000.usb: DWC OTG Controller [ 6.409399] dwc2 fe980000.usb: new USB bus registered, assigned bus number 3 [ 6.409432] dwc2 fe980000.usb: irq 23, io mem 0xfe980000 ... [ 111.796714] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers I think it is that "Configuration mismatch. dr_mode forced to host" log entry telling me that the port is acting as HOST mode instead of OTG mode. I have try putting these in usercfg.txt "dtoverlay=dwc2" "dtoverlay=dwc2,dr_mode=otg" "dtoverlay=dwc2,dr_mode=peripheral" and it will give the same result, no OTG functionality. On the same hardware running Raspbian Buster, it initialise successfully. Corresponding dmesg: ... [ 0.567531] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 0.570391] dwc_otg: FIQ enabled [ 0.570400] dwc_otg: NAK holdoff enabled [ 0.570409] dwc_otg: FIQ split-transaction FSM enabled [ 0.570421] Module dwc_common_port init ... [ 2.507634] dwc2 fe980000.usb: fe980000.usb supply vusb_d not found, using dummy regulator [ 2.511011] dwc2 fe980000.usb: Linked as a consumer to regulator.0 [ 2.514450] dwc2 fe980000.usb: fe980000.usb supply vusb_a not found, using dummy regulator [ 2.731860] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter lpm=1 [ 2.735511] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter lpm_clock_gating=1 [ 2.735522] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter besl=1 [ 2.735533] dwc2 fe980000.usb: dwc2_check_params: Invalid parameter hird_threshold_en=1 [ 2.735582] dwc2 fe980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM [ 2.752511] dwc2 fe980000.usb: DWC OTG Controller [ 2.752554] dwc2 fe980000.usb: new USB bus registered, assigned bus number 3 [ 2.752601] dwc2 fe980000.usb: irq 36, io mem 0xfe980000 ... [ 2.848843] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 [ 2.851601] g_ether gadget: g_ether ready [ 2.854580] dwc2 fe980000.usb: bound driver g_ether [ 2.998525] dwc2 fe980000.usb: new device is high-speed [ 3.075025] dwc2 fe980000.usb: new device is high-speed [ 3.139338] dwc2 fe980000.usb: new address 10 [ 3.154010] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
2020-02-14 13:59:12 Stefan Bader nominated for series Ubuntu Eoan
2020-02-14 13:59:12 Stefan Bader bug task added linux-raspi2 (Ubuntu Eoan)
2020-02-14 13:59:49 Stefan Bader linux-raspi2 (Ubuntu Eoan): importance Undecided High
2020-02-14 13:59:49 Stefan Bader linux-raspi2 (Ubuntu Eoan): status New In Progress
2020-02-14 15:56:46 Kleber Sacilotto de Souza linux-raspi2 (Ubuntu Eoan): status In Progress Fix Committed
2020-03-16 10:42:07 Launchpad Janitor linux-raspi2 (Ubuntu Eoan): status Fix Committed Fix Released
2020-03-16 10:42:07 Launchpad Janitor cve linked 2019-3016
2020-05-11 14:21:05 Juerg Haefliger bug task added linux-raspi (Ubuntu)
2020-05-11 14:21:18 Juerg Haefliger nominated for series Ubuntu Focal
2020-05-11 14:21:18 Juerg Haefliger bug task added linux-raspi2 (Ubuntu Focal)
2020-05-11 14:21:18 Juerg Haefliger bug task added linux-raspi (Ubuntu Focal)
2020-05-11 14:21:25 Juerg Haefliger bug task deleted linux-raspi (Ubuntu Eoan)
2020-05-11 14:21:32 Juerg Haefliger bug task deleted linux-raspi2 (Ubuntu Focal)
2020-05-13 12:26:55 Stefan Bader linux-raspi (Ubuntu Focal): importance Undecided Medium
2020-05-13 12:26:55 Stefan Bader linux-raspi (Ubuntu Focal): status New Triaged
2020-05-13 12:28:18 Stefan Bader linux-raspi (Ubuntu): status New Invalid
2020-05-14 03:49:44 Khaled El Mously linux-raspi (Ubuntu Focal): status Triaged Fix Committed
2020-05-16 12:37:46 Eric Fjøsne bug added subscriber Eric Fjøsne
2020-06-09 14:33:44 Juerg Haefliger bug added subscriber Juerg Haefliger
2020-06-10 02:45:53 Joel Mukai bug added subscriber Joel Mukai
2020-06-10 10:39:28 Launchpad Janitor linux-raspi (Ubuntu Focal): status Fix Committed Fix Released
2020-06-25 12:25:30 Launchpad Janitor linux-raspi (Ubuntu): status Invalid Fix Released
2022-04-23 02:49:47 Hui Wang linux-raspi2 (Ubuntu): status Triaged Fix Released