Re: problem FILL_CONTROL_URB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 21, 2004 at 06:25:04PM +0530, Navtez Singh wrote:
> /*function:*/
> 
> static int stir_write(struct usb_IrDA *IrDA_dev, unsigned short reg,
> unsigned char value)
> {
> 	int ret;
> 	FILL_CONTROL_URB(IrDA_dev->ctrl_urb, IrDA_dev->udev,
> 		      usb_sndbulkpipe(IrDA_dev->udev, IrDA_dev->bulk_out_endpointAddr),
> 		      IrDA_dev->setup_packet,value,1,
> 		      IrDA_write_ctrl_callback, IrDA_dev);
> 
> 	ret=usb_submit_urb(IrDA_dev->ctrl_urb);
> 
> return ret;
> }
> /* end of function */
> 
> /* this function has been called continously four times, but not in loop*/
> 
> 
> it doesn't work ... i dont why ?

How do you know if you can use that urb?  What if it is busy when you
try to reset it and submit it?  Bad things can happen then if you do
that (as you are seeing.)

thanks,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux