[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
urb unlink hanging
I'm having a problem where the kernel is freezing when the function
sohci_unlink_urb is attempting to shedule_timeout(timeout). The exact point
in the kerneL where it freezes is in add_timer(&timer) after the spinlock is
locked.
I attempted to fix this problem by setting the USB_ASYNC_UNLINK flag when the
urbs are created in the probe function. This stops the freezing of the
kernel, but my computer starts making a continuous humming noise after the
calls to sohci_unlink_urb. I'm not sure why my computer is humming, but I
know something is not going right.
I'm using a 2.4.17 kernel.
Any suggestions?
The urbs are set up this way:
if( (purb = (purb_t)usb_alloc_urb(NUMBER_OF_PACKETS)) == NULL )
{
MSG("Error allocating URB.\n");
goto p1; //de-allocate buffer
}
context->urbs[i] = purb ;
memset(purb, 0, sizeof(urb_t));
//
//fill in the URB
//
purb->dev = context->rasid_dev;
purb->transfer_flags = USB_ISO_ASAP | USB_ASYNC_UNLINK;
purb->number_of_packets = NUMBER_OF_PACKETS; //1
purb->context = context; //pointer to the
purb->transfer_buffer_length = TRANSFER_BUFFER_LENGTH; //64
if (i < SND_URB_POOL_SIZE) //setup a send URB
{
purb->pipe = context->snd_pipe;
purb->interval = ISOC_SND_INTERVAL; //1
purb->timeout = SND_TIMEOUT; //10000
purb->complete = rasid_snd_complete;
}
else //setup a receive
{
purb->pipe = context->rcv_pipe;
purb->interval = ISOC_RCV_INTERVAL; //1
purb->timeout = RCV_TIMEOUT; //10000
purb->complete = rasid_rcv_complete;
}
for (j = 0; j < NUMBER_OF_PACKETS; j++)
{
purb->iso_frame_desc[j].offset = (TRANSFER_PACKET_SIZE) * j ;
purb->iso_frame_desc[j].length = TRANSFER_PACKET_SIZE ;
}
if(!(purb->transfer_buffer = (char*)kmalloc(TRANSFER_BUFFER_LENGTH,
GFP_KERNEL)) ) {
MSG("Out of memory while allocating I/O buffer.\n");
goto p1; //de-allocate entire driver context
}
--
Anton Wilson
Camotion
Software Development
--
Camotion
Software Development
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/