hello,
I ran into another problem :-(
the following piece of code seems to cause an oops:
for (i= 0 ; i < NUMBER_RCV_URBS; i++) {
data_ctx_t *ctx = &(instance->rcvbufs[i]);
ctx->skb = alloc_skb(RECEIVE_BUFFER_SIZE, GFP_KERNEL);
if (!ctx->skb) continue;
ctx->urb = usb_alloc_urb(0);
if (!ctx->urb) {
kfree_skb(ctx->skb);
ctx->skb = NULL;
continue;
};
spin_lock_init(&ctx->urb->lock);
ctx->urb->dev = instance->usb_dev;
ctx->urb->pipe = usb_rcvbulkpipe(instance->usb_dev,
ENDPOINT_DATA_IN);
ctx->urb->transfer_buffer = ctx->skb->data;
ctx->urb->transfer_buffer_length = RECEIVE_BUFFER_SIZE;
ctx->urb->complete = data_receive;
ctx->urb->context = ctx;
ctx->urb->transfer_flags |= USB_QUEUE_BULK;
ctx->instance = instance;
printk(KERN_DEBUG "queueing urb (0x%p)nr %d\n", ctx->urb, i);
if (usb_submit_urb(ctx->urb) < 0)
printk(KERN_DEBUG "Loosing urb.\n");
}
This code causes the following oops:
Mar 29 01:16:10 Infinity kernel: queueing urb (0xcf6fade0)nr 0
Mar 29 01:16:10 Infinity kernel: Unable to handle kernel NULL pointer
dereference at virtual address 00000014
Mar 29 01:16:10 Infinity kernel: printing eip:
Mar 29 01:16:10 Infinity kernel: d08088c1
Mar 29 01:16:10 Infinity kernel: *pde = 00000000
Mar 29 01:16:10 Infinity kernel: Oops: 0000
Mar 29 01:16:10 Infinity kernel: CPU: 0
Mar 29 01:16:10 Infinity kernel: EIP: 0010:[<d08088c1>]
Mar 29 01:16:10 Infinity kernel: EFLAGS: 00013282
Mar 29 01:16:10 Infinity kernel: eax: 00000000 ebx: cf5e8b40 ecx:
c03003a4 edx: cf6fade0
Mar 29 01:16:10 Infinity kernel: esi: ce1fe300 edi: 00000000 ebp:
cdbc1fb0 esp: cdbc1f64
Mar 29 01:16:10 Infinity kernel: ds: 0018 es: 0018 ss: 0018
Mar 29 01:16:10 Infinity kernel: Process insmod (pid: 664,
stackpage=cdbc1000)
Mar 29 01:16:10 Infinity kernel: Stack: d081e673 cf6fade0 d081fe40
cf6fade0 00000000 ce1fe300 00000006 cdbc1fb0
Mar 29 01:16:10 Infinity kernel: d081e921 ce1fe300 00000008
00000000 d0820ad8 cdbc0233 cdbc0000 00000031
Mar 29 01:16:10 Infinity kernel: cdbc1fa8 000d9000 00004100
30393030 30304430 31343030 00000000 d081e9ef
Mar 29 01:16:10 Infinity kernel: Call Trace: [<d081e673>] [<d081fe40>]
[<d081e921>] [<d0820ad8>] [<d081e9ef>] [<d0820ad8>] [show_regs+172/176]
Mar 29 01:16:10 Infinity kernel: [kernel_thread+35/48]
Mar 29 01:16:10 Infinity kernel: Code: 8b 40 14 52 8b 40 0c ff d0 83 c4
04 c3 89 f6 b8 ff ff ff ff
I also had to disable a few atomic_inc() statements in my driver because
they also caused a similar oops.
I can't find any reason for this....
I am using 2.3.99-pre3 (usb-ohci, for a change...;)
J.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]