Re-enumeration of first USB device when second USB device is connected.

Hi,

I am newbie in windows device drivers development.

I am debugging a USB driver issue when two devices are connected.

Below is the scenario:

  1. 1st device is connected and enumerated successfully. here data exchange
    is happening on this device though a PC application without any problem.

  2. 2 nd device is connected and enumerated successfully. here data exchange
    is happening on this device though a PC application without any problem.

  3. now i am resetting(power recycle) the second device for every 1 min by
    some script.When 2nd device is reset, we see 1st device getting
    re-enumerated, which is resulting in discontinuation of the data exchange.

This behavior was rarely seen when we connect this setup to the external
hub.

Both the devices are using the same custom USB driver and both device are
same type.

more info:

when we connect three devices to external hub and resetting the second
device(port2), then only the devices which are connected to lower
ports(port1) of the hub getting effected but no effect on device which is
connected to upper ports(port3).

if we connected the four device also same behavior observed. only lower
port devices getting effected even if we reset third device(port3) then
port1 and port2 device getting reenumerated but no effect on port4 device.

Note:this test running for 2 days but this behavior observed every few
hours once.

Regards

johnbasha.

This is due to the hub, not software

Sent from my Windows 10 phone

From: johnny bashamailto:xxxxx
Sent: Friday, May 6, 2016 12:26 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Re-enumeration of first USB device when second USB device is connected.

Hi,

I am newbie in windows device drivers development.

I am debugging a USB driver issue when two devices are connected.

Below is the scenario:

1. 1st device is connected and enumerated successfully. here data exchange is happening on this device though a PC application without any problem.

2. 2 nd device is connected and enumerated successfully. here data exchange is happening on this device though a PC application without any problem.

3. now i am resetting(power recycle) the second device for every 1 min by some script.When 2nd device is reset, we see 1st device getting re-enumerated, which is resulting in discontinuation of the data exchange.

This behavior was rarely seen when we connect this setup to the external hub.

Both the devices are using the same custom USB driver and both device are same type.

more info:

when we connect three devices to external hub and resetting the second device(port2), then only the devices which are connected to lower ports(port1) of the hub getting effected but no effect on device which is connected to upper ports(port3).

if we connected the four device also same behavior observed. only lower port devices getting effected even if we reset third device(port3) then port1 and port2 device getting reenumerated but no effect on port4 device.

Note:this test running for 2 days but this behavior observed every few hours once.

Regards

johnbasha.

— NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at</mailto:xxxxx></mailto:xxxxx>

Hi doron holan,

we have used the multiple hub(different vendor) but same behavior observed in all the hubs.
we have ellisys usb analyzer and seen the port got resetting and remunerating the device.

what would be the root causes for this type of problems.

Capture a usb ETW log and see what it says.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Sunday, May 8, 2016 8:46 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Re-enumeration of first USB device when second USB device is connected.

Hi doron holan,

we have used the multiple hub(different vendor) but same behavior observed in all the hubs.
we have ellisys usb analyzer and seen the port got resetting and remunerating the device.

what would be the root causes for this type of problems.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

WHICH port is getting reset? The one for the hub, the one for Device 1, or the port for Device 2?

Peter
OSR
@OSRDrives

xxxxx@osr.com wrote:

WHICH port is getting reset? The one for the hub, the one for Device 1, or the port for Device 2?

I believe he originally said that resetting port 2 is causing the device
on port 1 to re-enumerate.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

@peter: I am resetting the device2 (power cycle) then port 2(hub’s) should be reset and device 2 should be re-enumerate.it was done properly and it should not effect the device 1 which is connected to port1 (hub’s). This is the actual process i feel.

but here the problem is device2(connected to hubs port2) reset causes the port1 reset and re-enumeration of the device 1.
Generally this behavior was not seen every time. only it was observed very rare cases like every few hours in day.

I hope this explanation will clear your doubts and if you have any queries please let me know.
if you people want i will upload the recorded file which was done using the ellisys analyzer.

thank you.

xxxxx@gmail.com wrote:

@peter: I am resetting the device2 (power cycle) then port 2(hub’s) should be reset and device 2 should be re-enumerate.it was done properly and it should not effect the device 1 which is connected to port1 (hub’s). This is the actual process i feel.

but here the problem is device2(connected to hubs port2) reset causes the port1 reset and re-enumeration of the device 1.
Generally this behavior was not seen every time. only it was observed very rare cases like every few hours in day.

I hope this explanation will clear your doubts and if you have any queries please let me know.
if you people want i will upload the recorded file which was done using the ellisys analyzer.

There’s nothing you or we can do about it. As Doron told you when you
first asked it, this is a problem in your USB hub.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I have to concur (though the fact that you use this on multiple hubs, presumably from different manufacturers and using different chipsets, makes me wonder what’s up). I don’t see any reason a reset of Port 2 on the hub should cause a reset of Port 1 on the hub.

Then again, it’s been a long time since I wrote a USB Hub Driver…

Peter
OSR
@OSRDrivers

To enumerate a port, the hub needs to disable other ports temporarily, because the device on that port doesn’t have a non-zero address yet. More than that, all upstream hubs need that too, to provide the only active path to the enumerated port. This may disrupt data exchange.

Please capture USB ETW logs to debug this further. https://blogs.msdn.microsoft.com/usbcoreblog/2012/08/07/how-to-capture-and-read-usb-etw-traces-in-windows-8/

Sent from my Windows 10 phone

From: xxxxx@gmail.commailto:xxxxx
Sent: Monday, May 9, 2016 9:52 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Re-enumeration of first USB device when second USB device is connected.

@peter: I am resetting the device2 (power cycle) then port 2(hub’s) should be reset and device 2 should be re-enumerate.it was done properly and it should not effect the device 1 which is connected to port1 (hub’s). This is the actual process i feel.

but here the problem is device2(connected to hubs port2) reset causes the port1 reset and re-enumeration of the device 1.
Generally this behavior was not seen every time. only it was observed very rare cases like every few hours in day.

I hope this explanation will clear your doubts and if you have any queries please let me know.
if you people want i will upload the recorded file which was done using the ellisys analyzer.

thank you.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx>

thank you all for your valuable inputs. but still have some doubts and more clarifications(conclusions) on how it will be hub driver issue.

@Alex Grig: what ever you said is going to apply for every time or else some rare scenarios only.in our case its rare scenarios. its not only effecting the data exchange but also re-enumerating the hub port to which device is connected.

@peter: if it is HUB driver issue, we tried same testing with different devices instead of the our devices. like we used two FTDI USB-UART adaptor to the same external usb hub and tried to reproduce the same issue. but didn’t observed.

@Vivek: now i am working on capturing the ETW log. i am not that much familiar with that tool. once i have done, let u know the results.

This and all some doubts which are roaming in mind.
once thank you very much all.

What flavor of USB is your setup? 2 or 3?

@Alex Grig: Our client usb device is usb 1.1 and pc port is 2.0 and external usb hub 3.0.
we are connecting our devices to external hub and connecting the external hub to the pc’s usb port.

  1. What do you mean by “power cycle device 2”? Is it externally powered device?
  2. What happens if you power cycle the device without running any traffic?
  3. What kind of transfer does your device use?

Also:
4. Is it bus-powered or self-powered hub?
5. In the bus capture, does it report over-current condition when a device is plugged?
6. What rush current you measured when your device is plugged?

  1. How many Transaction Translators does the hub report?
  2. Do you see TT Reset request on the capture after your device is power-cycled?
  1. What do you mean by “power cycle device 2”? Is it externally powered device?

Our device is like a kind of Gps receiver and it has a usb interface. we can power off and power on the Gps receiver with external power supply. we doing power off and on to gps receiver.

  1. What happens if you power cycle the device without running any traffic?

with respect to usb only the enumeration of the device(receiver has some os which gets boot.)

  1. What kind of transfer does your device use?

it kind of gps data exchange between the receiver and pc (Bulk data transfer)

  1. Is it bus-powered or self-powered hub?

the external hub is bus powered and it also have some external power supply. but we are not using that power supply in this setup.

  1. In the bus capture, does it report over-current condition when a device is
    plugged?

we have ellisys usb analyzer and captured the enumeration, we didn’t found any over-current condition, we only found No over-current condition exist.

  1. What rush current you measured when your device is plugged?
    No idea about this.

  2. How many Transaction Translators does the hub report?

Multi-TT

8.Do you see TT Reset request on the capture after your device is power-cycled?

We didn’t found any TT Reset request on the capture. we only found the following request while power cycled the device.

Hub status change
Get portstatus(2), 2 port number
Clearportstatu(2,connectionchanged)
Get portstatus(2)
Set portfeature(2,Reset)
Hub status change
Get portstatus(2)
Clearportstatu(2,Resetchanged)
Get portstatus(2)
SSPLIT OUT transaction
etc…

Does unexpected reenumeration happen when the hub has external power?
Do you have a capture for the case when device 1 gets reenumerated. What unusual do you see in it?

Does unexpected re-enumeration happen when the hub has external power?

YES unexpected re-enumeration happen when the hub has external power also.

Do you have a capture for the case when device 1 gets re-enumerated. What unusual
do you see in it?
As we have already mentioned we have ellisys USB Analyzer and we captured the enumeration process. we didn’t find anything is unusual. the unexpected re-enumeration of device is same the general enumeration process. no additional requests are captured by ellisys USB analyzer.

Note:we already mention this unexpected re-enumeration is not regular, its very rare scenarios we observed. since our device is GPS receiver so rare scenarios are also more important for us.