It looks like you need to take a peek at the Apple supplied drives in
the IOUSBFamily project in Darwin to see how we handle driver
termination. It appears that you are getting an error on a pipe->Read
return, and your driver is reissuing the Read before checking to see
what the error was. Any error will cause the pipe to be stalled at the
low level, which would cause the behavior you are seeing below when you
try to reissue the call.
I would suggest you take a look at how we handle a
kIOReturnNotResponding error in the IOUSBHIDDriver, and also how we
handle the willTerminate and didTerminate methods.
If your driver has the IOUSBInterface to which it is attached in the
open() state, then your driver will not get its stop() method invoked
until you call close() on your provider, but you should not do that if
you have any outstanding transactions to your provider.
I hope this is helpful.
Rhoads Hollowell
USB Software Team
Apple Computer, Inc.
On Wednesday, October 1, 2003, at 08:48 AM, Jessica Davies wrote:
Hello,
I am writing an I/O Kit driver for a composite USB device. My driver
inherits from IOService and is a client of IOUSBDevice. The device
has two interfaces with one interrupt endpoint each, the driver sets
up reads on these pipes. The problem I am having is if the device is
hot-unplugged, the stop() method of my driver doesn't get called, and
system.log reports:
USBF: 630.397 AppleUSBOHCI[0x18c6000]::CreateGeneralTransfer -
trying to queue to a stalled pipe
USBF: 630.397 AppleUSBOHCI[0x18c6000]::DoIOTransfer - error
0xe000404f queueing request
USBF: 630.397 AppleUSBOHCI[0x18c6000]::CreateGeneralTransfer -
trying to queue to a stalled pipe
USBF: 630.397 AppleUSBOHCI[0x18c6000]::DoIOTransfer - error
0xe000404f queueing request
I also notice that if I then plug in the device, a new entry gets
created in the I/O Registry so the number of entries for the device in
the I/O Registry keeps increasing each time I hot-plug the device. I
assume this has something to do with 'trying to queue a stalled pipe"
and stop() not getting called?
I thought I might be able to fix the stalled pipe issue by calling
Abort() on the IOUSBPipes in my stop() method, but it doesn't change
anything.
Thanks for any help,
Jessica
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.