Am Montag, 15. Januar 2007 09:10 schrieb Guenther Sohler:
> Unfortunately it does not work yet. It hangs as soon the driver internally
> sees the first data arriving via USB cable.
>
> Could anybody have a look at the code to see if there are basic mistakes ?
static void openradio_read_bulk_callback(struct urb *urb, struct pt_regs *regs)
{
struct usb_openradio *dev;
dev = (struct usb_openradio *)urb->context;
printk(KERN_ERR "callback\n");
dev->callbacks++;
if(!dev->running) goto end;
printk(KERN_ERR "read_bulk_callback\n");
/* sync/async unlink faults aren't errors */
if (urb->status &&
!(urb->status == -ENOENT ||
urb->status == -ECONNRESET ||
urb->status == -ESHUTDOWN)) {
dbg("%s - nonzero write bulk status received: %d",
__FUNCTION__, urb->status);
}
printk(KERN_ERR "openradio_read_bulk_callback_1\n");
// nur wenn nicht schon up !
// as long as data wanted
down_interruptible(&dev->sem_wantdata);
You cannot use semaphores in interrupt context. Please read the kernel
documentation about spinlocks and locking in general.
Regards
Oliver
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel