linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Strange problem with USB device
@ 2021-06-08 17:41 Larry Finger
  2021-06-08 17:57 ` Greg KH
  2021-06-08 18:20 ` Alan Stern
  0 siblings, 2 replies; 11+ messages in thread
From: Larry Finger @ 2021-06-08 17:41 UTC (permalink / raw)
  To: linux-usb, LKML; +Cc: ierturk

Hi,

In https://bugzilla.suse.com/show_bug.cgi?id=1186889, a user is reporting that 
his Bluetooth component of a Realtek RTL8822CE is not being found in openSUSE's 
kernel 5.3.18. His lsusb scan is as follows:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 13d3:56c9 IMC Networks HP TrueVision HD Camera
Bus 001 Device 002: ID 045e:07fd Microsoft Corp. Nano Transceiver 1.1
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The Bluetooth device is found and works in Windows 10, where the Device Manager 
reports hardware ID's of 0bda:b00c. This combination is in driver btusb.

Is there a bug in the USB bus scan in kernel 5.3.18 that has since been fixed, 
or is there still a bug that misses this device?

Thanks,

Larry



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

* Re: Strange problem with USB device
  2021-06-08 17:41 Strange problem with USB device Larry Finger
@ 2021-06-08 17:57 ` Greg KH
  2021-06-08 18:31   ` Larry Finger
  2021-06-08 18:20 ` Alan Stern
  1 sibling, 1 reply; 11+ messages in thread
From: Greg KH @ 2021-06-08 17:57 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-usb, LKML, ierturk

On Tue, Jun 08, 2021 at 12:41:23PM -0500, Larry Finger wrote:
> Hi,
> 
> In https://bugzilla.suse.com/show_bug.cgi?id=1186889, a user is reporting
> that his Bluetooth component of a Realtek RTL8822CE is not being found in
> openSUSE's kernel 5.3.18. His lsusb scan is as follows:
> 
> $ lsusb
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 003: ID 13d3:56c9 IMC Networks HP TrueVision HD Camera
> Bus 001 Device 002: ID 045e:07fd Microsoft Corp. Nano Transceiver 1.1
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> The Bluetooth device is found and works in Windows 10, where the Device
> Manager reports hardware ID's of 0bda:b00c. This combination is in driver
> btusb.
> 
> Is there a bug in the USB bus scan in kernel 5.3.18 that has since been
> fixed, or is there still a bug that misses this device?

Loads of things have changed since 5.3.18, that was a long time ago :)

Are you sure this device doesn't need a "magic" command sent to it in
order for it to show up as a USB device on the bus?  That sometimes
happens :(

thanks,

greg k-h

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

* Re: Strange problem with USB device
  2021-06-08 17:41 Strange problem with USB device Larry Finger
  2021-06-08 17:57 ` Greg KH
@ 2021-06-08 18:20 ` Alan Stern
  2021-06-08 18:37   ` Larry Finger
  1 sibling, 1 reply; 11+ messages in thread
From: Alan Stern @ 2021-06-08 18:20 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-usb, LKML, ierturk

On Tue, Jun 08, 2021 at 12:41:23PM -0500, Larry Finger wrote:
> Hi,
> 
> In https://bugzilla.suse.com/show_bug.cgi?id=1186889, a user is
> reporting that his Bluetooth component of a Realtek RTL8822CE is not

Is that a USB device?  That is, does it connect to the computer 
via a USB cable?  I'll assume it does...

> being found in openSUSE's kernel 5.3.18. His lsusb scan is as follows:
> 
> $ lsusb
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 003: ID 13d3:56c9 IMC Networks HP TrueVision HD Camera
> Bus 001 Device 002: ID 045e:07fd Microsoft Corp. Nano Transceiver 1.1
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> The Bluetooth device is found and works in Windows 10, where the Device
> Manager reports hardware ID's of 0bda:b00c. This combination is in
> driver btusb.
> 
> Is there a bug in the USB bus scan in kernel 5.3.18 that has since been
> fixed, or is there still a bug that misses this device?

Given only the information you have provided, it is impossible to 
answer that question.  Broadly speaking, lots of bugs in the USB 
subsystem have been fixed since kernel 5.3.18, but I don't know 
if any of them would affect detecting new devices on the bus like 
this.

One thing you might try is to turn on USB debugging before 
plugging in the device:

echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control

The additional information this adds to the dmesg log may be 
helpful.

Alan Stern

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

* Re: Strange problem with USB device
  2021-06-08 17:57 ` Greg KH
@ 2021-06-08 18:31   ` Larry Finger
  0 siblings, 0 replies; 11+ messages in thread
From: Larry Finger @ 2021-06-08 18:31 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb, LKML, ierturk

On 6/8/21 12:57 PM, Greg KH wrote:
> 
> Loads of things have changed since 5.3.18, that was a long time ago :)
> 
> Are you sure this device doesn't need a "magic" command sent to it in
> order for it to show up as a USB device on the bus?  That sometimes
> happens :(

I am having the person with the problem try an openSUSE Tumbleweed rescue system 
to see if a 5.12 kernel can see the device.

None of the other Realtek devices have hidden their USB ID behind some magic 
command.

Larry


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

* Re: Strange problem with USB device
  2021-06-08 18:20 ` Alan Stern
@ 2021-06-08 18:37   ` Larry Finger
  2021-06-08 18:53     ` Alan Stern
  0 siblings, 1 reply; 11+ messages in thread
From: Larry Finger @ 2021-06-08 18:37 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-usb, LKML, ierturk

On 6/8/21 1:20 PM, Alan Stern wrote:
> On Tue, Jun 08, 2021 at 12:41:23PM -0500, Larry Finger wrote:
>> Hi,
>>
>> In https://bugzilla.suse.com/show_bug.cgi?id=1186889, a user is
>> reporting that his Bluetooth component of a Realtek RTL8822CE is not
> 
> Is that a USB device?  That is, does it connect to the computer
> via a USB cable?  I'll assume it does...
> 
>> being found in openSUSE's kernel 5.3.18. His lsusb scan is as follows:
>>
>> $ lsusb
>> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>> Bus 001 Device 003: ID 13d3:56c9 IMC Networks HP TrueVision HD Camera
>> Bus 001 Device 002: ID 045e:07fd Microsoft Corp. Nano Transceiver 1.1
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>
>> The Bluetooth device is found and works in Windows 10, where the Device
>> Manager reports hardware ID's of 0bda:b00c. This combination is in
>> driver btusb.
>>
>> Is there a bug in the USB bus scan in kernel 5.3.18 that has since been
>> fixed, or is there still a bug that misses this device?
> 
> Given only the information you have provided, it is impossible to
> answer that question.  Broadly speaking, lots of bugs in the USB
> subsystem have been fixed since kernel 5.3.18, but I don't know
> if any of them would affect detecting new devices on the bus like
> this.
> 
> One thing you might try is to turn on USB debugging before
> plugging in the device:
> 
> echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
> 
> The additional information this adds to the dmesg log may be
> helpful.

The BT device is part of the same card as the PCIe wifi device, thus there is no 
"plugging" it in a conventional sense. Is there some way to add the usbcore 
debugging statement to the kernel options line at boot time?

As I told GregKH, I am having the person with the problem try a rescue system 
with a 5.12 kernel.

Larry


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

* Re: Strange problem with USB device
  2021-06-08 18:37   ` Larry Finger
@ 2021-06-08 18:53     ` Alan Stern
  2021-06-08 20:56       ` Larry Finger
  2021-06-08 23:35       ` Larry Finger
  0 siblings, 2 replies; 11+ messages in thread
From: Alan Stern @ 2021-06-08 18:53 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-usb, LKML, ierturk

On Tue, Jun 08, 2021 at 01:37:07PM -0500, Larry Finger wrote:
> On 6/8/21 1:20 PM, Alan Stern wrote:
> > One thing you might try is to turn on USB debugging before
> > plugging in the device:
> > 
> > echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
> > 
> > The additional information this adds to the dmesg log may be
> > helpful.
> 
> The BT device is part of the same card as the PCIe wifi device, thus
> there is no "plugging" it in a conventional sense.

I don't get it.  If this is a PCIe device, why should it appear 
on a USB bus?  Wouldn't you expect it to show up as a PCI device 
on a PCI bus instead?

>  Is there some way to
> add the usbcore debugging statement to the kernel options line at boot
> time?

Yes.  Use the kernel boot-line parameter:

	usbcore.dyndbg="=p"

FYI, how to use dynamic debugging is explained at length in the 
kernel source file 
Documentation/admin-guide/dynamic-debug-howto.rst.

Alan Stern

> As I told GregKH, I am having the person with the problem try a rescue
> system with a 5.12 kernel.
> 
> Larry
> 

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

* Re: Strange problem with USB device
  2021-06-08 18:53     ` Alan Stern
@ 2021-06-08 20:56       ` Larry Finger
  2021-06-09  2:12         ` Alan Stern
  2021-06-08 23:35       ` Larry Finger
  1 sibling, 1 reply; 11+ messages in thread
From: Larry Finger @ 2021-06-08 20:56 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-usb, LKML, ierturk

On 6/8/21 1:53 PM, Alan Stern wrote:
> I don't get it.  If this is a PCIe device, why should it appear
> on a USB bus?  Wouldn't you expect it to show up as a PCI device
> on a PCI bus instead?
> 

I do not know the internal details, but Realtek packages a PCIe wifi device and 
a bluetooth USB device in the same package. Intel does the same thing on my 
Wireless 7260.

My lsusb shows:
Bus 003 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 8087:07dc Intel Corp. Bluetooth wireless interface
Bus 002 Device 003: ID 0bda:c822 Realtek Semiconductor Corp. Bluetooth Radio
Bus 002 Device 002: ID 04f2:b3b2 Chicony Electronics Co., Ltd TOSHIBA Web Camera 
- FHD
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I have no devices plugged into a USB port.

Larry


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

* Re: Strange problem with USB device
  2021-06-08 18:53     ` Alan Stern
  2021-06-08 20:56       ` Larry Finger
@ 2021-06-08 23:35       ` Larry Finger
  1 sibling, 0 replies; 11+ messages in thread
From: Larry Finger @ 2021-06-08 23:35 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman; +Cc: linux-usb, LKML, ierturk

On 6/8/21 1:53 PM, Alan Stern wrote:
> Yes.  Use the kernel boot-line parameter:
> 
> 	usbcore.dyndbg="=p"
> 

This command was tried, but no additional output occurred in dmesg.

The user has now tried a number of Linux distros, none of which worked, thus it 
seems to be a kernel problem. I have written to the BT people at Realtek to see 
if they have an suggestions. I will let you know when I learn more.

Larry


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

* Re: Strange problem with USB device
  2021-06-08 20:56       ` Larry Finger
@ 2021-06-09  2:12         ` Alan Stern
  2021-06-11  0:08           ` Ibrahim Erturk
  0 siblings, 1 reply; 11+ messages in thread
From: Alan Stern @ 2021-06-09  2:12 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-usb, LKML, Bjorn Helgaas, linux-pci, ierturk

On Tue, Jun 08, 2021 at 03:56:11PM -0500, Larry Finger wrote:
> On 6/8/21 1:53 PM, Alan Stern wrote:
> > I don't get it.  If this is a PCIe device, why should it appear
> > on a USB bus?  Wouldn't you expect it to show up as a PCI device
> > on a PCI bus instead?
> > 
> 
> I do not know the internal details, but Realtek packages a PCIe wifi
> device and a bluetooth USB device in the same package. Intel does the
> same thing on my Wireless 7260.
> 
> My lsusb shows:
> Bus 003 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 002 Device 004: ID 8087:07dc Intel Corp. Bluetooth wireless interface
> Bus 002 Device 003: ID 0bda:c822 Realtek Semiconductor Corp. Bluetooth Radio
> Bus 002 Device 002: ID 04f2:b3b2 Chicony Electronics Co., Ltd TOSHIBA
> Web Camera - FHD
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> I have no devices plugged into a USB port.

Okay, now I get the picture.  The Intel PCIe card contains an 
EHCI USB host controller plus a couple of on-board USB Bluetooth 
devices and an on-board USB webcam, in addition to the PCIe wifi 
device.

Which means you're looking at the problem all wrong.  It isn't a 
USB problem at all; it's a PCI problem.  Namely, why doesn't the 
system detect the USB host controller on the PCIe board?

I have added the PCI maintainer and mailing list to the CC.  
Maybe they can help shed some light.

The original Suse Bugzilla report:

	https://bugzilla.suse.com/show_bug.cgi?id=1186889

shows the Realtek board at PCI address 0000:03:00.0, but there's 
no mention of a USB host controller on that board.  The only host 
controller on the system is the one at address 0000:00:14.0, 
which is xHCI and is directly on the motherboard.

Furthermore, there's no trace of any mention of an EHCI USB host 
controller in the system log.  So maybe the board has to be told 
somehow to turn that controller on before it will show up, and 
the rtw_8822ce driver isn't giving the appropriate order.

Can the bug reporter get information from Windows about the USB 
host controllers, and in particular, the one on the RTL8822 
board?

Alan Stern

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

* Re: Strange problem with USB device
  2021-06-09  2:12         ` Alan Stern
@ 2021-06-11  0:08           ` Ibrahim Erturk
  2021-06-11  2:13             ` Alan Stern
  0 siblings, 1 reply; 11+ messages in thread
From: Ibrahim Erturk @ 2021-06-11  0:08 UTC (permalink / raw)
  To: Alan Stern; +Cc: Larry Finger, linux-usb, LKML, Bjorn Helgaas, linux-pci

Hi,

I've already attached logs and a snapshot from the device manager on
the windows side into the bug report. Hope this helps.

Regards,
Ibrahim ERTURK

On Wed, Jun 9, 2021 at 5:12 AM Alan Stern <stern@rowland.harvard.edu> wrote:
>
> On Tue, Jun 08, 2021 at 03:56:11PM -0500, Larry Finger wrote:
> > On 6/8/21 1:53 PM, Alan Stern wrote:
> > > I don't get it.  If this is a PCIe device, why should it appear
> > > on a USB bus?  Wouldn't you expect it to show up as a PCI device
> > > on a PCI bus instead?
> > >
> >
> > I do not know the internal details, but Realtek packages a PCIe wifi
> > device and a bluetooth USB device in the same package. Intel does the
> > same thing on my Wireless 7260.
> >
> > My lsusb shows:
> > Bus 003 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
> > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> > Bus 002 Device 004: ID 8087:07dc Intel Corp. Bluetooth wireless interface
> > Bus 002 Device 003: ID 0bda:c822 Realtek Semiconductor Corp. Bluetooth Radio
> > Bus 002 Device 002: ID 04f2:b3b2 Chicony Electronics Co., Ltd TOSHIBA
> > Web Camera - FHD
> > Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >
> > I have no devices plugged into a USB port.
>
> Okay, now I get the picture.  The Intel PCIe card contains an
> EHCI USB host controller plus a couple of on-board USB Bluetooth
> devices and an on-board USB webcam, in addition to the PCIe wifi
> device.
>
> Which means you're looking at the problem all wrong.  It isn't a
> USB problem at all; it's a PCI problem.  Namely, why doesn't the
> system detect the USB host controller on the PCIe board?
>
> I have added the PCI maintainer and mailing list to the CC.
> Maybe they can help shed some light.
>
> The original Suse Bugzilla report:
>
>         https://bugzilla.suse.com/show_bug.cgi?id=1186889
>
> shows the Realtek board at PCI address 0000:03:00.0, but there's
> no mention of a USB host controller on that board.  The only host
> controller on the system is the one at address 0000:00:14.0,
> which is xHCI and is directly on the motherboard.
>
> Furthermore, there's no trace of any mention of an EHCI USB host
> controller in the system log.  So maybe the board has to be told
> somehow to turn that controller on before it will show up, and
> the rtw_8822ce driver isn't giving the appropriate order.
>
> Can the bug reporter get information from Windows about the USB
> host controllers, and in particular, the one on the RTL8822
> board?
>
> Alan Stern

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

* Re: Strange problem with USB device
  2021-06-11  0:08           ` Ibrahim Erturk
@ 2021-06-11  2:13             ` Alan Stern
  0 siblings, 0 replies; 11+ messages in thread
From: Alan Stern @ 2021-06-11  2:13 UTC (permalink / raw)
  To: Ibrahim Erturk; +Cc: Larry Finger, linux-usb, LKML, Bjorn Helgaas, linux-pci

On Fri, Jun 11, 2021 at 03:08:16AM +0300, Ibrahim Erturk wrote:
> Hi,
> 
> I've already attached logs and a snapshot from the device manager on
> the windows side into the bug report. Hope this helps.

Yes, it does help.  Although the information in those reports is somewhat 
disorganized, it clearly shows there is only one USB host controller in the 
system, and that is the one Linux detects.  So my impression that we weren't 
finding the host controller was wrong.

Back to my earlier guess: The Realtek board has to be told to do something in 
order to make the Bluetooth device start working, such as turning on a power 
source.  (And perhaps that is what the RealTek people were talking about when 
they suggested the problem could be in the rtw8822 power-up sequence.)  Whatever 
it is, the rtw8822 driver isn't doing it.

This means it's still a PCI problem.

Alan Stern

PS: Larry, the discrepancy between Windows reporting an Intel USB hub and Linux 
reporting two Linux Foundation hubs isn't real -- or at least, it's what should 
be expected.  I can explain in more detail if you're curious, but you don't need 
to worry about it.

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

end of thread, other threads:[~2021-06-11  2:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 17:41 Strange problem with USB device Larry Finger
2021-06-08 17:57 ` Greg KH
2021-06-08 18:31   ` Larry Finger
2021-06-08 18:20 ` Alan Stern
2021-06-08 18:37   ` Larry Finger
2021-06-08 18:53     ` Alan Stern
2021-06-08 20:56       ` Larry Finger
2021-06-09  2:12         ` Alan Stern
2021-06-11  0:08           ` Ibrahim Erturk
2021-06-11  2:13             ` Alan Stern
2021-06-08 23:35       ` Larry Finger

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).