[Bug 2060770] [NEW] NVMe drive fails at high write workload after kernel upgrades

2024-04-10 Thread Enoch Leung
Public bug reported:

My problem is similarly described in this old thread:
https://unix.stackexchange.com/questions/742360/

journalctl message: one of the many related logs
Apr 09 15:37:40.096850 ** kernel: Linux version 6.5.0-26-lowlatency 
(buildd@lcy02-amd64-109) (x86_64-linux-gnu-gcc-12 (Ubunntu 
12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) 
#26.1~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 13 10:41:42 UTC (Ubuntu 
6.5.0-26.26.1~22.04.1-lowlatency 6.5.13)

Apr 09 15:43:46.238697 ** kernel: nvme nvme0: controller is down; will 
reset: CSTS=0x, PCI_STATUS=0x10
Apr 09 15:43:46.239162 ** kernel: nvme nvme0: Does your device have a 
faulty power saving mode enabled?
Apr 09 15:43:46.239266 ** kernel: nvme nvme0: Try 
"nvme_core.default_ps_max_latency_us=0 pcie_aspm=off" and report a bug
Apr 09 15:43:46.690200 ** kernel: nvme :06:00.0: enabling device ( 
-> 0002)
Apr 09 15:43:46.690409 ** kernel: nvme nvme0: Disabling device after reset 
failure: -19
Apr 09 15:43:46.698188 ** kernel: I/O error, dev nvme0n1, sector 1216896 op 
0x1:(WRITE) flags 0xc800 phys_seg 1 prio clas>

I was using 22.04.4 with hwe kernel, as shown above (kernel 6.5)
upgrade to 24.04 dev hoping the problem would be resolved, but no it still 
exists (kernel 6.8)

The problem happens after some kernel upgrades that I'd done after
2024-03-01, but I cannot pinpoint when; the nvme_core kernel param as
shown in the message above does not help.

The problem does NOT exist with 22.04 regular kernel:
Currently I'd created a VM to perform my heavy write workload using pci 
passthrough of the NVMe drive, and it works okay.  Cannot downgrade host to 
older kernel because of ZFS pool being upgraded

VM info (where my NVMe drive works okay)

uname -r
5.15.0-78-lowlatency

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 22.04.4 LTS
Release:22.04
Codename:   jammy

(maybe) related hardware spec
CPU: AMD Ryzen 5750G (x8x4x4)
Chipset: AMD B450
NVMe: Samsung MZ1LB960HBJR-000FB (PM983a, f/w EDW73F2Q)

** Affects: linux (Ubuntu)
 Importance: Undecided
 Status: New

** Description changed:

  My problem is similarly described in this old thread:
  https://unix.stackexchange.com/questions/742360/
  
  journalctl message: one of the many related logs
- Apr 09 15:37:40.096850 awepet kernel: Linux version 6.5.0-26-lowlatency 
(buildd@lcy02-amd64-109) (x86_64-linux-gnu-gcc-12 (Ubunntu 
12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) 
#26.1~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 13 10:41:42 UTC (Ubuntu 
6.5.0-26.26.1~22.04.1-lowlatency 6.5.13)
+ Apr 09 15:37:40.096850 ** kernel: Linux version 6.5.0-26-lowlatency 
(buildd@lcy02-amd64-109) (x86_64-linux-gnu-gcc-12 (Ubunntu 
12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) 
#26.1~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Mar 13 10:41:42 UTC (Ubuntu 
6.5.0-26.26.1~22.04.1-lowlatency 6.5.13)
  
  Apr 09 15:43:46.238697 ** kernel: nvme nvme0: controller is down; will 
reset: CSTS=0x, PCI_STATUS=0x10
  Apr 09 15:43:46.239162 ** kernel: nvme nvme0: Does your device have a 
faulty power saving mode enabled?
  Apr 09 15:43:46.239266 ** kernel: nvme nvme0: Try 
"nvme_core.default_ps_max_latency_us=0 pcie_aspm=off" and report a bug
  Apr 09 15:43:46.690200 ** kernel: nvme :06:00.0: enabling device 
( -> 0002)
  Apr 09 15:43:46.690409 ** kernel: nvme nvme0: Disabling device after 
reset failure: -19
  Apr 09 15:43:46.698188 ** kernel: I/O error, dev nvme0n1, sector 1216896 
op 0x1:(WRITE) flags 0xc800 phys_seg 1 prio clas>
  
  I was using 22.04.4 with hwe kernel, as shown above (kernel 6.5)
  upgrade to 24.04 dev hoping the problem would be resolved, but no it still 
exists (kernel 6.8)
  
  The problem happens after some kernel upgrades that I'd done after
  2024-03-01, but I cannot pinpoint when; the nvme_core kernel param as
  shown in the message above does not help.
  
  The problem does NOT exist with 22.04 regular kernel:
  Currently I'd created a VM to perform my heavy write workload using pci 
passthrough of the NVMe drive, and it works okay.  Cannot downgrade host to 
older kernel because of ZFS pool being upgraded
  
  VM info (where my NVMe drive works okay)
  
  uname -r
  5.15.0-78-lowlatency
  
  lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:Ubuntu 22.04.4 LTS
  Release:22.04
  Codename:   jammy
  
  (maybe) related hardware spec
  CPU: AMD Ryzen 5750G (x8x4x4)
  Chipset: AMD B450
  NVMe: Samsung MZ1LB960HBJR-000FB (PM983a, f/w EDW73F2Q)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2060770

Title:
  NVMe drive fails at high write workload after kernel upgrades

To manage notifications about this bug 

[Bug 1936831] Re: libvirt ACPI on unsupported machine

2021-07-22 Thread Enoch Leung
Hi Dann,

Thanks for looking into it.  I am trying pi 3b emulation at the moment,
as I want to try things out with VMs instead of the real SBC.  My target
is to try things out before deploying to the real SBC, hence why I want
to use emulation of specific machine type.  I see that most tutorial
online make use of directly calling qemu-system-aarch64 instead of
managing it via libvirt.

I also looked into using machine=virt: it means if I use a machine=virt
VM, I should use a distro that support ARM with a EFI bootloader like
ubuntu-server, right?  that means only distro supporting UEFI would
work...  maybe I can try to move the EFI binaries across distros, though
in iteslf it is another form of usage, not the one that I'd mentioned
above, and it also means those distro may not work "out of box".

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1936831

Title:
  libvirt ACPI on unsupported machine

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1936831/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1936831] Re: libvirt ACPI on unsupported machine

2021-07-22 Thread Enoch Leung
Thanks for looking into it.

1. raspi3b or similar ARM machines do not support ACPI, so the 
snippet should not exist in libvirt VM's domain XML, or it will complain
this or that, refusing to start just as you'd tried.  That's also why my
example machine XML does not have it.

2. without the  snippet, I see that libvirt is constructing the
VM startup QEMU command with "-no-acpi"

3. with this parameter passed to QEMU, it seems that QEMU will try to
set a "machine variable", which my guess is "raspi3b-machine.acpi",
maybe trying to set it to 0 as disable?  Given that this machine type
does not support ACPI, this variable may be not defined, and thus failed
to be set, and hence failed to start.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1936831

Title:
  libvirt ACPI on unsupported machine

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1936831/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1936831] [NEW] libvirt ACPI on unsupported machine

2021-07-19 Thread Enoch Leung
Public bug reported:

I am trying QEMU on Raspberry Pi 4 B 4GB and is encountering an issue
trying to start a VM using machine type raspi3b.

OS: Ubuntu 21.04, 5.11.0-1007-raspi

Sample libvirt domain xml (tried to be minimal)

  raspi3b
  1048576
  1048576
  4
  
hvm
  
  
  
  destroy
  restart
  destroy
  
/usr/bin/qemu-system-aarch64

  


Error: qemu-system-aarch64: Property 'raspi3b-machine.acpi' not found

It seems that libvirt will put "-no-acpi" to the qemu starting command
it creates, and that caused the error above.  If I try to mimic the
start VM command w/o this, VM seems to be running (but I am no expert to
really test it out)

May the maintainer help validate whether it is the real cause and have a
fix for it (and other QEMU machine types that do not support ACPI
anyway)?  Or, should it be a bug be filed for QEMU instead?

** Affects: libvirt (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1936831

Title:
  libvirt ACPI on unsupported machine

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1936831/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-06-20 Thread Enoch Leung
Confirmed to work now after upgrading to linux-image-5.4.0-1012-raspi,
which also fixed the warm boot issue I'd reported in 1871977.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1864132] Re: g_ether missing eem support

2020-06-20 Thread Enoch Leung
*** This bug is a duplicate of bug 1861070 ***
https://bugs.launchpad.net/bugs/1861070

I just updated kernel to have OTG working again as per #1861070, and can
tell that EEM support is still missing.

/sys/module/g_ether/parameters has no entry of use_eem has per "modinfo
g_ether" mentioned.  g_cdc / g_multi has no use_eem as per modinfo, and
I am not sure if it is also a good place to ask for that being added to
these two modules or not.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1864132

Title:
  g_ether missing eem support

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1864132/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1871977] Re: g_ether not working after reboot

2020-06-03 Thread Enoch Leung
Sorry OTG is not working on my Pi4 after upgrade to Focal, so I cannot
tell.  Again, pls. refer to bug #1861070

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1871977

Title:
  g_ether not working after reboot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/1871977/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-06-03 Thread Enoch Leung
I just upgraded to Focal and yes, the issue just come back.

## from dmesg ##
[5.722325] dwc2 fe98.usb: fe98.usb supply vusb_d not found, using 
dummy regulator
[5.722385] dwc2 fe98.usb: fe98.usb supply vusb_a not found, using 
dummy regulator
[5.722541] dwc2 fe98.usb: Configuration mismatch. dr_mode forced to host

So unlikely the compilation flag is applied to the current Focal kernel.

## from dpkg -l ##
ii  linux-raspi2 5.4.0.1011.11

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1864132] Re: g_ether missing eem support

2020-06-03 Thread Enoch Leung
Sorry I cannot tell, as the OTG issue just come back after I upgraded to
Focal via do-release-upgrade.  Pls. refer to bug #1861070

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1864132

Title:
  g_ether missing eem support

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1864132/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1872567] [NEW] ZFS ARC has memory issue with THP enabled

2020-04-13 Thread Enoch Leung
Public bug reported:

Problem: erratic host behaviour after "kernel NULL pointer dereference" appears
Config:
  host = Ryzen 3600 w/2x16GB, ZFS RAIDZ1 5 vdevs
  guest = Windows 7 w/16GB, zvol 64GB+512GB, QXL 16MB (planning for vfio-GPU-pt)
Behavior: per dmesg, seems related to THP compacting + ARC memory allocation.  
once deference issue happens, host will become erratic.  Reboot host lengthen 
from 60s to >500s, and sometimes bash will die as well.

 /etc/modprobe.d/*.conf ==
options zfs zfs_arc_max=4294967296
options zfs zfs_arc_min=268435456
options zfs zfs_arc_sys_free=268435456
options vfio_iommu_type1allow_unsafe_interrupts=1 disable_hugepages=1
options kvm ignore_msrs=1 report_ignored_msrs=0

 free -h ==
  totalusedfree  shared  buff/cache   available
Mem:   31Gi28Gi   2.4Gi   1.0Mi   617Mi   2.7Gi
Swap:  84Gi   0.0Ki84Gi

 THP info ==
/sys/kernel/mm/transparent_hugepage/enabled = always [madvise] never
/sys/kernel/mm/transparent_hugepage/defrag = always defer defer+madvise 
[madvise] never
AnonHugePages:  16322560 kB
Hugepagesize:   2048 kB
nr_anon_transparent_hugepages 7970
thp_fault_alloc 23907
thp_fault_fallback 0
thp_collapse_alloc 1
thp_collapse_alloc_failed 0
thp_file_alloc 0
thp_file_mapped 0
thp_split_page 9
thp_split_page_failed 164
thp_deferred_split_page 15938
thp_split_pmd 9
thp_split_pud 0
thp_zero_page_alloc 1
thp_zero_page_alloc_failed 0
thp_swpout 0
thp_swpout_fallback 0

 dmesg trace log ==
[ 2516.858188] BUG: kernel NULL pointer dereference, address: 006c
[ 2516.858194] #PF: supervisor read access in kernel mode
[ 2516.858196] #PF: error_code(0x) - not-present page
[ 2516.858198] PGD 0 P4D 0 
[ 2516.858201] Oops:  [#1] PREEMPT SMP NOPTI
[ 2516.858204] CPU: 5 PID: 491 Comm: systemd-udevd Tainted: P   O  
5.3.0-46-lowlatency #38-Ubuntu
[ 2516.858207] Hardware name: To Be Filled By O.E.M. To Be Filled By 
O.E.M./B450M Pro4, BIOS P3.90 12/09/2019
[ 2516.858246] RIP: 0010:arc_kmem_reap_soon+0x52/0xe0 [zfs]
[ 2516.858249] Code: 05 5f 28 17 00 85 c0 0f 85 95 00 00 00 45 31 f6 45 31 e4 
31 db eb 03 4d 89 ee 4c 89 e0 4c 8b 24 dd 80 79 d3 c0 49 39 c4 74 0d <41> 8b 74 
24 6c 4c 89 e7 e8 91 f5 8f ff 4c 8b 2c dd 80 79 cf c0 4d
[ 2516.858253] RSP: :bab7c0757958 EFLAGS: 00010207
[ 2516.858256] RAX: 8e3d63751800 RBX: 7000 RCX: 61c8864680b583eb
[ 2516.858258] RDX: ae605d38 RSI: 8e3d63750c50 RDI: 8e3d63750c70
[ 2516.858260] RBP: bab7c0757978 R08: 8e3d63750c50 R09: 0002840a
[ 2516.858262] R10: 8e3d58ca0098 R11: 8e3d6e86a8b0 R12: 
[ 2516.858264] R13: 8e3d63750c00 R14: 8e3d63750c00 R15: 
[ 2516.858267] FS:  7fb3bd2a7880() GS:8e3d6e74() 
knlGS:
[ 2516.858269] CS:  0010 DS:  ES:  CR0: 80050033
[ 2516.858272] CR2: 006c CR3: 0007e86fc000 CR4: 00340ee0
[ 2516.858274] Call Trace:
[ 2516.858304]  __arc_shrinker_func.isra.0+0xf4/0x190 [zfs]
[ 2516.858334]  arc_shrinker_func_scan_objects+0x15/0x30 [zfs]
[ 2516.858339]  do_shrink_slab+0x14f/0x2e0
[ 2516.858343]  shrink_slab+0xac/0x260
[ 2516.858345]  shrink_node+0xf4/0x490
[ 2516.858349]  node_reclaim+0x1f6/0x340
[ 2516.858353]  get_page_from_freelist+0xb8/0x390
[ 2516.858357]  __alloc_pages_nodemask+0x166/0x320
[ 2516.858362]  alloc_pages_vma+0xda/0x190
[ 2516.858366]  wp_page_copy+0x88/0x850
[ 2516.858368]  ? reuse_swap_page+0x70/0x370
[ 2516.858371]  do_wp_page+0x90/0x620
[ 2516.858374]  __handle_mm_fault+0x76f/0x7a0
[ 2516.858377]  handle_mm_fault+0xd4/0x1f0
[ 2516.858381]  do_user_addr_fault+0x201/0x450
[ 2516.858384]  __do_page_fault+0x58/0x90
[ 2516.858386]  do_page_fault+0x2c/0x100
[ 2516.858390]  page_fault+0x34/0x40
[ 2516.858392] RIP: 0033:0x5618000f015e
[ 2516.858395] Code: 28 00 00 00 75 06 48 83 c4 20 5d c3 e8 5b 2a ff ff 66 66 
2e 0f 1f 84 00 00 00 00 00 41 54 31 c0 ba ff ff ff ff 53 48 83 ec 08  0f b1 
15 c6 8f 08 00 83 f8 ff 74 35 41 89 c4 85 c0 75 21 31 c0
[ 2516.858400] RSP: 002b:7fffeccd0da0 EFLAGS: 00010206
[ 2516.858402] RAX:  RBX: 5618013d4420 RCX: 
[ 2516.858404] RDX:  RSI: 7fffeccd0de0 RDI: 5618013d4420
[ 2516.858407] RBP: 7fffeccd0de0 R08: 56180015ea20 R09: 561801430600
[ 2516.858409] R10: 561801430628 R11: 0005 R12: 01eb
[ 2516.858411] R13: 5618013f87b0 R14: 5618013d6fc0 R15: 0001
[ 2516.858415] Modules linked in: vhost_net vhost tap ebtable_filter ebtables 
ip6_tables iptable_filter bpfilter bridge stp llc tcp_westwood 
hid_logitech_hidpp joydev input_leds zfs(PO) edac_mce_amd kvm_amd zunicode(PO) 
zavl(PO) kvm icp(PO) 

[Bug 1871977] [NEW] g_ether not working after reboot

2020-04-09 Thread Enoch Leung
Public bug reported:

There is an issue with g_ether after warm reboot.

Hardware I used for testing:

Thinkpad L470 + Dock, Ubuntu 19.10
USB 3.0 "A male-plug Y-cable" + USB-A to USB-C adapter
Pi4 4GB powered by Y-cable connecting to dock and separate USB PSU, Ubuntu 19.10

==
it seems like whenever I reboot my Pi, USB gadget port is not detected.  How to 
reproduce:

1) make sure g_ether works on Pi 4
2) make sure cdc_ether works on L470, as in dmesg it shows...
[112961.147030] usb 1-3.2: new high-speed USB device number 11 using xhci_hcd
[112961.237399] usb 1-3.2: New USB device found, idVendor=045e, idProduct=0301, 
bcdDevice= 5.03
[112961.237406] usb 1-3.2: New USB device strings: Mfr=1, Product=2, 
SerialNumber=3
[112961.237411] usb 1-3.2: Product: USB Adapter
[112961.237414] usb 1-3.2: Manufacturer: Raspberry Pi
[112961.237418] usb 1-3.2: SerialNumber: ***MASKED***
[112961.245067] cdc_ether 1-3.2:1.0 eth1: register 'cdc_ether' at 
usb-:00:14.0-3.2, CDC Ethernet Device, ***MASKED***
3) verify IP connectivity works from L470 to Pi 4.
4) reboot Pi 4; on L470 it shows:
[113343.783925] usb 1-3.2: USB disconnect, device number 11
[113343.784164] cdc_ether 1-3.2:1.0 eth1: unregister 'cdc_ether' 
usb-:00:14.0-3.2, CDC Ethernet Device
5) wait for Pi 4 to become available (I use wifi on Pi 4 + ssh on L470)
==

Expected: Pi4 should show up to L470 as USB ethernet gadget after warm reboot
Actual: g_ether is loaded on Pi4 but L470 does not detect it
Workaround: unplug Pi4 and plug in again, it will work;  given that I am using 
Y-cable, unplugging will not power down Pi 4.
Concern: lose connectivity that needs human intervention to correct, i.e. 
cannot do it remotely.

Note: I remember it is detected okay before I file for bug #1861070, not
sure if it is related or not.  using g_cdc should be the same, but not
separately tested.

** Affects: linux-raspi2 (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1871977

Title:
  g_ether not working after reboot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1871977/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861643] Re: libvirt CPU model selection missing

2020-04-09 Thread Enoch Leung
sorry for delays.

for both of my machines, kvm-ok =>

INFO: /dev/kvm exists
KVM acceleration can be used


and for QMP output, pls. see attachments.

** Attachment added: "amp output for both machines"
   
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1861643/+attachment/5350843/+files/qmp.zip

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861643

Title:
  libvirt CPU model selection missing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1861643/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861643] Re: libvirt CPU model selection missing

2020-03-11 Thread Enoch Leung
Here's the other machine's info as requested with AMD CPU.

** Attachment added: "b450m_pro4_ryzen_3600.zip"
   
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1861643/+attachment/5335713/+files/b450m_pro4_ryzen_3600.zip

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861643

Title:
  libvirt CPU model selection missing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1861643/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861643] Re: libvirt CPU model selection missing

2020-03-01 Thread Enoch Leung
Here's the one with my L470 (xml + txt).  I will provide the ones with
my Ryzen later.

** Attachment added: "l470_i3_7100u.zip"
   
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1861643/+attachment/5332646/+files/l470_i3_7100u.zip

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861643

Title:
  libvirt CPU model selection missing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1861643/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1864132] Re: g_ether missing eem support

2020-02-20 Thread Enoch Leung
** Package changed: libvirt (Ubuntu) => linux-raspi2 (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1864132

Title:
  g_ether missing eem support

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1864132/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1864132] [NEW] g_ether missing eem support

2020-02-20 Thread Enoch Leung
Public bug reported:

I am looking into enabling EEM with g_ether by module option use_eem=1,
and g_ether won't be loaded because it has no EEM support compiled.

Expected: EEM is compiled with g_ether (no such option for g_cdc) so
that it can be enabled by use_eem=1.

My "/sys/module/g_ether/parameters":
-r--r--r-- 1 root root 4096 Feb 20 13:40 bcdDevice
-r--r--r-- 1 root root 4096 Feb 20 13:40 dev_addr
-r--r--r-- 1 root root 4096 Feb 20 13:40 host_addr
-r--r--r-- 1 root root 4096 Feb 20 13:40 iManufacturer
-r--r--r-- 1 root root 4096 Feb 20 13:40 iProduct
-r--r--r-- 1 root root 4096 Feb 20 13:40 iSerialNumber
-r--r--r-- 1 root root 4096 Feb 20 13:40 idProduct
-r--r--r-- 1 root root 4096 Feb 20 13:40 idVendor
-rw-r--r-- 1 root root 4096 Feb 20 14:08 qmult

modinfo g_ether:
parm:   idVendor:USB Vendor ID (ushort)
parm:   idProduct:USB Product ID (ushort)
parm:   bcdDevice:USB Device version (BCD) (ushort)
parm:   iSerialNumber:SerialNumber string (charp)
parm:   iManufacturer:USB Manufacturer string (charp)
parm:   iProduct:USB Product string (charp)
parm:   qmult:queue length multiplier at high/super speed (uint)
parm:   dev_addr:Device Ethernet Address (charp)
parm:   host_addr:Host Ethernet Address (charp)
parm:   use_eem:use CDC EEM mode (bool)

dmesg:
...
[4.474689] udc-core: couldn't find an available UDC - added [g_ether] to 
list of pending drivers
...
[5.768660] dwc2 fe98.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[5.772414] g_ether fe98.usb: failed to start g_ether: -2
...

 should it be another bug? -
There is another issue that when my laptop is connected and the with my Pi 4 
reboot, the cdc_ether function provided to my laptop will not be available 
again until I reconnect the cable (I have USB Y-cable + type-c adapter so I can 
unplug on laptop side w/o Pi 4 losing power).  I remember it was working as 
expected when I was testing out OTG function.

** Affects: libvirt (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1864132

Title:
  g_ether missing eem support

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1864132/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861643] [NEW] libvirt CPU model selection missing

2020-02-02 Thread Enoch Leung
Public bug reported:

As of 5.4.0-0ubuntu5 on Ubuntu 19.10 x86_64, available CPU model
selection as I can see from virt-manager is still missing some CPU
models.  Here's some info based on running "virsh capabilities"

Host: Lenovo L470 (UEFI=1.71), i3-7100u ==> I cannot select SkyLake-whatever in 
virt-manager as it is detected as Broadwell

  x86_64
  Broadwell-noTSX-IBRS
  Intel
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  


ASRock B450M Pro (UEFI 3.90), Ryzen 3600 ==> no CPU model is available for 
selection in virt-manager, and I have to use  at the moment, really not preferred.

  x86_64
  EPYC-IBPB
  AMD
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  


Expected: CPU model <= host CPU model should be selectable.  in case of
i3-7100u, it means SkyLake-Client should be available;  in case of Ryzen
3600, at least EPYC should be available.

** Affects: libvirt (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861643

Title:
  libvirt CPU model selection missing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1861643/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-02-01 Thread Enoch Leung
For me I would still prefer using "dtoverlay=dwc2,dr_mode=peripheral" as
it is more reliable at the moment: if pi4 is rebooted remotely, it will
come up with the necessary interface as I added g_cdc to
/etc/modprobe.d/modules.

On my setup it should not be power related, as I'm using a cable that
should provide <=0.9A from PC's USB-A and <=2.1A from an external PSU =
2.5~3A in total.  Based on my test before out of curiosity, my pi4 uses
~0.6A when idle, and up to 1.5A during CPU stress test.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-02-01 Thread Enoch Leung
sorry, typo above: /etc/modules instead of /etc/modprobe.d/modules.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-01-30 Thread Enoch Leung
some configuration I'd tried:
1. dtoverlay=dwc_otg, or comment out = no difference
2. with no other dtoverlay, I actually set "dtoverlay=vc4-fkms-v3d" in 
syscfg.txt, and comment it out or not also make no difference

I didn't grab every dmesg, but without both dwc_otg and vc4-fkms-v3d,
here you go:

- pi4 -
[1.677307] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[1.884348] Core Release: 2.80a
[1.888641] Setting default values for core params
[1.892857] Finished setting default values for core params
[1.966759] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[2.099551] Using Buffer DMA mode
[2.103715] Periodic Transfer Interrupt Enhancement - disabled
[2.107870] Multiprocessor Interrupt Enhancement - disabled
[2.112043] OTG VER PARAM: 0, OTG VER FLAG: 0
[2.116220] Dedicated Tx FIFOs mode
[2.121186] WARN::dwc_otg_hcd_init:1043: FIQ DMA bounce buffers: virt = 
1060b000 dma = 0xf951 len=9024
[2.121384] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, 
bcdDevice= 4.21
[2.125542] FIQ FSM acceleration enabled for :
   Non-periodic Split Transactions
   Periodic Split Transactions
   High-Speed Isochronous Endpoints
   Interrupt/Control Split Transaction hack enabled
[2.129850] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[2.150875] dwc_otg: Microframe scheduler enabled
[2.155145] usb 1-1: Product: USB2.0 Hub
[2.155171] WARN::hcd_init_fiq:496: MPHI regs_base at 10305200
[2.161313] hub 1-1:1.0: USB hub found
[2.163817] dwc_otg fe98.usb: DWC OTG Controller
[2.168259] hub 1-1:1.0: 4 ports detected
[2.172320] dwc_otg fe98.usb: new USB bus registered, assigned bus 
number 3
[2.180968] dwc_otg fe98.usb: irq 24, io mem 0x
[2.185310] Init: Port Power? op_state=1
[2.189549] Init: Power Port (0)
[2.194099] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, 
bcdDevice= 5.03
[2.198369] usb usb3: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[2.202590] usb usb3: Product: DWC OTG Controller
[2.206801] usb usb3: Manufacturer: Linux 5.3.0-1017-raspi2 dwc_otg_hcd
[2.211037] usb usb3: SerialNumber: fe98.usb
[2.216023] hub 3-0:1.0: USB hub found
[2.220290] hub 3-0:1.0: 1 port detected
[2.225408] dwc_otg: FIQ enabled
[2.225419] dwc_otg: NAK holdoff enabled
[2.225430] dwc_otg: FIQ split-transaction FSM enabled
[2.225458] Module dwc_common_port init
...
[5.701961] udc-core: couldn't find an available UDC - added [g_cdc] to list 
of pending drivers

no more g_cdc driver related loading message afterward.  so, I have to
keep using "dtoverlay=dwc2,dr_mode=peripheral" at the moment

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-01-30 Thread Enoch Leung
Hi Hui, just in case I tried again, but no it won't work if I put
"dtoverlay=dwc2" w/o dr_mode.  I remember dwc2 should be new code and
should be used, hence why I use that instead of dwc_otg.

Anyway, if we use "dtoverlay=dwc2" only, I guess the actual "dr_mode"
value may not be init properly in run time memory space, and thus it
didn't work.  Say using no "dr_mode", on my Pi 4B I can see g_cdc driver
loaded correctly, but then on the host side, my L470, it actually won't
work.  Something like this would appear:

- pi4 -
[5.317371] udc-core: couldn't find an available UDC - added [g_cdc] to list 
of pending drivers
...
[7.497909] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 
2008
[7.497913] g_cdc gadget: g_cdc ready
[7.497921] dwc2 fe98.usb: bound driver g_cdc

- L470 -
[44740.491468] usb 1-3.1: new high-speed USB device number 18 using xhci_hcd
[44741.837984] usb 1-3.1: device descriptor read/64, error -71
[44757.718734] usb 1-3.1: device descriptor read/64, error -110
[44757.902877] usb 1-3.1: new high-speed USB device number 19 using xhci_hcd
[44763.350132] usb 1-3.1: device descriptor read/64, error -110
[44779.223840] usb 1-3.1: device descriptor read/64, error -110
[44779.329078] usb 1-3-port1: attempt power cycle
[44779.942228] usb 1-3.1: new high-speed USB device number 20 using xhci_hcd
[44785.366277] usb 1-3.1: device descriptor read/64, error -110
[44801.236885] usb 1-3.1: device descriptor read/64, error -110
[44801.423944] usb 1-3.1: new high-speed USB device number 21 using xhci_hcd
[44806.870008] usb 1-3.1: device descriptor read/64, error -110
[44822.743518] usb 1-3.1: device descriptor read/64, error -110
[44822.849333] usb 1-3-port1: unable to enumerate USB device

but if I use "dtoverlay=dwc2,dr_mode=peripheral" then no problem.  I
didn't test the Ethernet part yet as I don't have the network part
properly set up, so I tried g_cdc instead, bind console to ttyGS0 with
systemd and tried login from L470 to Pi via minicom, which was
successful.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-01-29 Thread Enoch Leung
Sorry, too haste, seems like it works a bit different than Raspbian.
Using your new kernel with this set in usercfg.txt, OTG mode is working fine.

dtoverlay=dwc2,dr_mode=peripheral

though with Raspbian, only "dtoverlay=dwc2" is needed, which was what I
was using.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-01-29 Thread Enoch Leung
Thanks Hui for the new kernel.  It is not fully working yet though.  I
attach the two "dmesg --color=always" output for your comparison.

Using your new kernel, my Pi 4B can load g_ether successfully with
Ubuntu.  However, OTG mode is still not working as expected.  Connected
to my L470 running Ubuntu 19.10, P4B on ubuntu gives:

- this is output from dmesg on L470 -
[114144.192312] usb 1-3.1: new high-speed USB device number 15 using xhci_hcd
[114144.572780] usb 1-3.1: device descriptor read/64, error -71
[114160.102412] usb 1-3.1: device descriptor read/64, error -110
[114160.287331] usb 1-3.1: new high-speed USB device number 16 using xhci_hcd
[114165.734418] usb 1-3.1: device descriptor read/64, error -110
[114181.606824] usb 1-3.1: device descriptor read/64, error -110
[114181.712895] usb 1-3-port1: attempt power cycle
[114182.324401] usb 1-3.1: new high-speed USB device number 17 using xhci_hcd
[114187.750644] usb 1-3.1: device descriptor read/64, error -110
[114203.622447] usb 1-3.1: device descriptor read/64, error -110
[114203.806762] usb 1-3.1: new high-speed USB device number 18 using xhci_hcd
[114209.253645] usb 1-3.1: device descriptor read/64, error -110
[114225.126520] usb 1-3.1: device descriptor read/64, error -110
[114225.233412] usb 1-3-port1: unable to enumerate USB device

when I boot my Pi 4B on Raspbian, the output is as expected:

- this is output from dmesg on L470 -
[114365.055969] usb 1-3.1: new high-speed USB device number 19 using xhci_hcd
[114365.146823] usb 1-3.1: New USB device found, idVendor=0525, idProduct=a4a2, 
bcdDevice= 4.19
[114365.146837] usb 1-3.1: New USB device strings: Mfr=1, Product=2, 
SerialNumber=0
[114365.146844] usb 1-3.1: Product: RNDIS/Ethernet Gadget
[114365.146849] usb 1-3.1: Manufacturer: Linux 4.19.93-v7l+ with fe98.usb
[114365.161097] cdc_subset: probe of 1-3.1:1.0 failed with error -22
[114365.162862] cdc_subset 1-3.1:1.1 usb0: register 'cdc_subset' at 
usb-:00:14.0-3.1, Linux Device, 7a:e4:85:af:64:35
[114365.162980] usbcore: registered new interface driver cdc_subset
[114365.163051] cdc_ether: probe of 1-3.1:1.0 failed with error -16
[114365.163119] usbcore: registered new interface driver cdc_ether

Any suggestion?  I simply use some random values as g_ether module
parameters.

** Attachment added: "dmesgs.tgz"
   
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+attachment/5323811/+files/dmesgs.tgz

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Re: [Bug 1861070] Re: Raspberry Pi 4B: USB OTG is not working

2020-01-28 Thread Enoch Leung
Thanks for quick reply.  It is the same USB-C power supply port which
can also work as OTG port.  I tried Raspbian Buster + g_ether with USB
cable connecting to my machine (Lenovo L470 on docking), and it is
detected.  On both Raspbian and my L470 running Ubuntu 19.10, usb0 are
created when I do “ip addr”.  I am using a ‘dual port USB cable’ so that
I can provide 2.1A from a USB power supply + 0.5A from PC’s USB port, so
it is not a concern in term of powering up my Pi 4B.

Pls. Let me know if there is anything I can help in fixing this bug,
thanks.

Sent from my iPad

> On 28 Jan 2020, at 16:55, Hui Wang  wrote:
> 
> I remember on the rpi4B board, there is no physical usb-otg port at all?
> could you please tell me which port is for otg?
> 
> -- 
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1861070
> 
> Title:
>  Raspberry Pi 4B: USB OTG is not working
> 
> Status in linux-raspi2 package in Ubuntu:
>  New
> 
> Bug 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 fe98.usb: fe98.usb supply vusb_d not found, 
> using dummy regulator
>  [6.358388] dwc2 fe98.usb: fe98.usb supply vusb_a not found, 
> using dummy regulator
>  [6.358545] dwc2 fe98.usb: Configuration mismatch. dr_mode forced to 
> host
>  [6.409098] dwc2 fe98.usb: DWC OTG Controller
>  [6.409399] dwc2 fe98.usb: new USB bus registered, assigned bus 
> number 3
>  [6.409432] dwc2 fe98.usb: irq 23, io mem 0xfe98
>  ...
>  [  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 fe98.usb: fe98.usb supply vusb_d not found, 
> using dummy regulator
>  [2.511011] dwc2 fe98.usb: Linked as a consumer to regulator.0
>  [2.514450] dwc2 fe98.usb: fe98.usb supply vusb_a not found, 
> using dummy regulator
>  [2.731860] dwc2 fe98.usb: dwc2_check_params: Invalid parameter lpm=1
>  [2.735511] dwc2 fe98.usb: dwc2_check_params: Invalid parameter 
> lpm_clock_gating=1
>  [2.735522] dwc2 fe98.usb: dwc2_check_params: Invalid parameter besl=1
>  [2.735533] dwc2 fe98.usb: dwc2_check_params: Invalid parameter 
> hird_threshold_en=1
>  [2.735582] dwc2 fe98.usb: EPs: 8, dedicated fifos, 4080 entries in 
> SPRAM
>  [2.752511] dwc2 fe98.usb: DWC OTG Controller
>  [2.752554] dwc2 fe98.usb: new USB bus registered, assigned bus 
> number 3
>  [2.752601] dwc2 fe98.usb: irq 36, io mem 0xfe98
>  ...
>  [2.848843] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
>  [2.851601] g_ether gadget: g_ether ready
>  [2.854580] dwc2 fe98.usb: bound driver g_ether
>  [2.998525] dwc2 fe98.usb: new device is high-speed
>  [3.075025] dwc2 fe98.usb: new device is high-speed
>  [3.139338] dwc2 fe98.usb: new address 10
>  [3.154010] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
> 
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1861070] [NEW] Raspberry Pi 4B: USB OTG is not working

2020-01-27 Thread Enoch Leung
Public bug reported:

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 fe98.usb: fe98.usb supply vusb_d not found, using 
dummy regulator
[6.358388] dwc2 fe98.usb: fe98.usb supply vusb_a not found, using 
dummy regulator
[6.358545] dwc2 fe98.usb: Configuration mismatch. dr_mode forced to host
[6.409098] dwc2 fe98.usb: DWC OTG Controller
[6.409399] dwc2 fe98.usb: new USB bus registered, assigned bus number 3
[6.409432] dwc2 fe98.usb: irq 23, io mem 0xfe98
...
[  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 fe98.usb: fe98.usb supply vusb_d not found, using 
dummy regulator
[2.511011] dwc2 fe98.usb: Linked as a consumer to regulator.0
[2.514450] dwc2 fe98.usb: fe98.usb supply vusb_a not found, using 
dummy regulator
[2.731860] dwc2 fe98.usb: dwc2_check_params: Invalid parameter lpm=1
[2.735511] dwc2 fe98.usb: dwc2_check_params: Invalid parameter 
lpm_clock_gating=1
[2.735522] dwc2 fe98.usb: dwc2_check_params: Invalid parameter besl=1
[2.735533] dwc2 fe98.usb: dwc2_check_params: Invalid parameter 
hird_threshold_en=1
[2.735582] dwc2 fe98.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[2.752511] dwc2 fe98.usb: DWC OTG Controller
[2.752554] dwc2 fe98.usb: new USB bus registered, assigned bus number 3
[2.752601] dwc2 fe98.usb: irq 36, io mem 0xfe98
...
[2.848843] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[2.851601] g_ether gadget: g_ether ready
[2.854580] dwc2 fe98.usb: bound driver g_ether
[2.998525] dwc2 fe98.usb: new device is high-speed
[3.075025] dwc2 fe98.usb: new device is high-speed
[3.139338] dwc2 fe98.usb: new address 10
[3.154010] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)

** Affects: linux-raspi2 (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861070

Title:
  Raspberry Pi 4B: USB OTG is not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs