xxxxx@yahoo.com wrote:
Cuold you say me where to find description for error codes.
That’s a pretty fundamental question. A bit of digging through the DDK
should have pointed you to ntstatus.h.
I set USBD_START_ISO_TRANSFER_ASAP flag, for all isoc transfers. And I have just read that this is restricted for first transaction on a newly opened or reset pipe.
In my opinion, this is more of a theoretical concern than a practical
one. There is a potential issue in a very heavily loaded system, when
the host controller cannot service its requests in time, but I have not
seen this occur in the real world.
I just send text. And I do only out transfers(so far, but I want in transfers to). Device enspoint’s maxpacket size is 64 and interval is 1.
That’s fine. Is it a USB 1 device, or a USB 2 device?
> Why do you launch a thread for this?
>
I don’t know, I think it is better to start thread after IRP_MN_START_DEVICE retrurn, then in thread submit URBs.
No. As a general rule, there are very few cases in which the typical
kernel driver needs to spawn a new thread. There are as many exceptions
to that general rule as there are driver programmers, of course, but
creating and submitting a bunch of URBs takes very little time.
I did have a case this week where I needed a driver thread; I have a USB
camera that requires a bunch of initialization, and because of a bug in
their I2C implementation, the initialization sequence takes 7 or 8
seconds. I didn’t want to hold off START_DEVICE for that long…
> IoAllocateIrp must be paired with IoFreeIrp.
>
I have not done IoFreeIrp. Can it couse a reboot of system.
If you keep doing IoAllocateIrp without freeing them, eventually you
will run out of non-paged pool memory and cause a blue screen. The
default action for a blue screen today is to reboot.
> It is interesting that in same computer there are ports, when I connect them device, my driver runs only once, it configures device and fails isoc transfers(with above status). But when I connect device to other ports, my driver may run 3 or 4 times(IRP_MN_REMOVE_DEVICE then again AddDevice and IRP_MN_START_DEVICE ), after which windows says thay your device may perform faster if you connect it to usb2.0 … and isoc transfers SUCCEDS!!! and I can catch them from device.
>
I have seen this several times, caused by mechanical issues when the USB
connector doesn’t seat well. This can be caused by low quality cables,
worn-out USB hubs, cable pulled at the wrong angle, etc.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.