Creating URB in completion callback

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: USB list <linux-usb@...>
Date: Friday, July 3, 2009 - 2:37 pm

Dear Experts,

I am trying to create a new URB in the completion call back.
Here I am giving the code that I am using.

void my_usb_stor_blocking_completion(struct urb *urb)
{

struct urb *rr_urb ;

//
//
//

	rr_urb = (struct urb*)kmalloc(sizeof(struct urb), GFP_KERNEL);
                if( NULL == rr_urb)
                   return -ENOMEM;
                memcpy(rr_urb, urb, sizeof(struct urb));
                usb_fill_bulk_urb(rr_urb,
current_urb_context->pusb_dev, current_urb_context->stat_bulkin_pipe,
prd_ready, 4,
		      			my_usb_stor_blocking_completion,(void*)current_urb_context);

//
//
//

}

With this code, the system is going to hanging.
Is there any thing I need to do while creating a URB ?

Thanks and Regards,
RD
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Creating URB in completion callback, Ramya Desai, (Fri Jul 3, 2:37 pm)
Re: Creating URB in completion callback, Alan Stern, (Fri Jul 3, 3:50 pm)
Re: Creating URB in completion callback, Ramya Desai, (Fri Jul 3, 4:19 pm)