On Mon, 25 Jul 2005, Prabhakar Kalasani wrote: > Hi All, > I am having the following problem when there is a problem in one of > transfers(urbs), like short read complete or endpoint halted.
Have you tried using 2.6.12 instead of 2.6.9? > Okay I will explain my situation. > Suppose I have multiple mass storage urbs from usb_sg_wait ( in the > drivers/core/message.c), lets say I have 16 URBs,all are linked to be > scheduled to the endpoint. > I got the error on 2nd URB and completed the URB with status -EREMOTEIO, > then mass_storage_driver tries to remove the remaing 14 uncompleted URBs > from completion routine Actually this is done by the scatter-gather library, not by the mass-storage driver. > sg_complete( again in drivers/usb/core/message.c), I am supposed to > complete the urb thats being unlinked It's not clear what you mean here. _You_ don't complete URBs at all; the USB subsystem completes them for you and then calls a completion routine. In this case the completion routine is part of the scatter-gather library (sg_complete, as you mentioned above) so you don't need to do anything. > then when I complete the urb it > calls the same completion routine sg_complete, and this one is protected > by spin_lock(&io->lock), so I get this problem, whenever I try to complete > the urbs being removed, What is the problem you get? > also the same problem happens when transfers are > being cancelled from usb_sg_cancel( again in usb/core/message.c), the same > spin_lock problem will happen if I call urb->complete routine for the urb > being removed. What spinlock problem? Whatever the problem is, maybe it won't occur if you don't call urb->complete. After all, you're not supposed to call urb->complete; the system calls it for you. > Can somebody help me to solve this problem, also I want to take unblocked > urbs not one at a time ? I don't understand this question. What is an "unblocked" URB? What do you mean "take unblocked urbs"? How do you "take" an URB? Alan Stern ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
