Hi,

I wanted to know the correct behaviour of usb_reset_device() and tried to
use it in usbmouse.c through an ioctl and it results in oops (oops message
attached in the mail). Kernel is 2.4.18-4.

On analyzing the oops message, the assembly code coming is :

000011c0 <usb_submit_urb>:
    11c0:       8b 54 24 04             mov    0x4(%esp,1),%edx
    11c4:       85 d2                   test   %edx,%edx
    11c6:       74 1e                   je     11e6 <usb_submit_urb+0x26>
    11c8:       8b 42 14                mov    0x14(%edx),%eax
    11cb:       85 c0                   test   %eax,%eax
    11cd:       74 17                   je     11e6 <usb_submit_urb+0x26>
    11cf:       8b 80 bc 00 00 00       mov    0xbc(%eax),%eax
    11d5:       85 c0                   test   %eax,%eax
    11d7:       74 0d                   je     11e6 <usb_submit_urb+0x26>
    11d9:       8b 40 18                mov    0x18(%eax),%eax
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    11dc:       85 c0                   test   %eax,%eax
    11de:       74 06                   je     11e6 <usb_submit_urb+0x26>


The corresponding source code of usb_submit_urb() :

int usb_submit_urb(urb_t *urb)
{
        if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
                                                ^^^^^^^^^^^^^^^^^^
                return urb->dev->bus->op->submit_urb(urb);
        else
                return -ENODEV;
}

It seems that the usb_bus structure is getting corrupted somewhere and 
while accesing the 'op' member, it results in segmentation violation. 

Is it a known problem or should it be debugged further? Has anyone used
usb_reset_device()?



        Thanks,
        Manoj
Unable to handle kernel paging request at virtual address 3d4c5664
 printing eip:
c01fbc09
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c01fbc09>]    Not tainted
EFLAGS: 00010202

EIP is at  (2.4.18-b-2.0)
eax: 3d4c564c   ebx: c11f6a00   ecx: c60abe98   edx: c774ae80
esi: 0000012c   edi: c60abe94   ebp: c60aa000   esp: c60abe88
ds: 0018   es: 0018   ss: 0018
Process a.out (pid: 916, stackpage=c60ab000)
Stack: c01fbcf2 c774ae80 c60abea4 00000000 c60abeac c60abeac 00000000 00000000 
       c60aa000 c60abe98 c60abe98 c11f6a00 84000000 c656aa80 00000000 c01fbe59 
       c774ae80 0000012c c60abed4 00000246 00000000 c656aa80 0000012c c11f6a00 
Call Trace: [<c01fbcf2>]  
[<c01fbe59>]  
[<c01fbef4>]  
[<c01fcd21>]  
[<c01ff956>]  
[<c0126457>]  
[<c013578d>]  
[<c811259a>]  
[<c0142b77>]  
[<c0108903>]  


Code: 8b 40 18 85 c0 74 06 52 ff 50 0c 5a c3 b8 ed ff ff ff c3 8d 
 <7>hub.c: port 1, portstatus 303, change 0, 1.5 Mb/s
hub.c: port 1, portstatus 303, change 0, 1.5 Mb/s
hub.c: port 1, portstatus 303, change 0, 1.5 Mb/s
hub.c: port 1, portstatus 303, change 0, 1.5 Mb/s

Reply via email to