On Sat, 19 Aug 2006 11:45:08 +0200
Peter Oehry <[EMAIL PROTECTED]> wrote:

> On Fri, 18 Aug 2006 17:29:32 -0400 (EDT)
> Alan Stern <[EMAIL PROTECTED]> wrote:
> 
> > On Fri, 18 Aug 2006, Peter Oehry wrote:
> > 
> > > The new log shows whats going wrong. But I don't see why?
> > > It seems that the parameters passed to the set_usb_configuration() are 
> > > completely rubbish.
> > 
> > Okay, I figured it out (after lots of testing).  It's really stupid.
> > 
> > Near the end of the patch, just after the line where it calls 
> > schedule_work(), change
> > 
> >     if (rc) {
> > 
> > to
> > 
> >     if (!rc) {
> > 
> > I'm going to complain bitterly about the way queue_work() and 
> > schedule_work() return 0 for failure.  This is the second time I've 
> > tripped over that.
> > 
> 
> That was the problem. It works know :-) 
> 
> Thank you!

There is one small question left.

What shall we return in the usb_driver_set_configuration when the 
schedule_work() returns zero? I belive it should be a negative number. But 
which error code would be appropriate?

        rc = schedule_work(&req->work); /* returns 0 on error - 1 if successful 
*/
        if (!rc) {
                usb_put_dev(udev);
                kfree(req);
                return ???? /* << which return would be appropriate? */
        }
        return 0; /* << I've replace return rc by return 0 */

> 
> Peter Oehry

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to