Hi.  I'm using the ohci-isp1362 driver, and I'm finally getting it
working.  However, I can make it crash every time I use a
usb-serial adapter.

I seem to trigger the BUG_ON(xfer_size < mps) in process_td.
(ohci-isp1362-emu.c)  It seems the null pointer dereference is
caused by the BUG_ON macro.. but I'd prefer not to trigger this bug
in the first place!

Lothar, since you're familiar with this code, do you have any idea
what the problem could be, or where I should look?

Thanks,
Mike


This is the surrounding code:

 // Allocate the required data
 index = alloc_ptd(dev, xfer_type);
 if (index < 0) {
         return -EBUSY;
 }
 mark_td(td);

 xfer_size = ptd_xfer_size(ptd_q, xfer_type, len);
 printk("len = %d, xfer_size = %d, mps = %d, xfer_type = %d\n",
len, xfer_size, mps, xfer_type);
 if (xfer_size < len && xfer_size % mps) {
         BUG_ON(xfer_size < mps);
         // round down to an integer multiple of max_packet_size
         xfer_size -= xfer_size % mps;
 }
 dir = ed_td_to_pid[ed_pid(ed_flags)][td_pid(td_flags)];
 if (dir < 0) {
         return -EINVAL;
 }

And these are the resultant debug messages:

# echo hi > /devfs/usb/tts/0
len = 8, xfer_size = 8, mps = 8, xfer_type = 0
len = 1, xfer_size = 1, mps = 8, xfer_type = 0
len = 0, xfer_size = 0, mps = 8, xfer_type = 0
len = 8, xfer_size = 8, mps = 8, xfer_type = 0
len = 1, xfer_size = 1, mps = 8, xfer_type = 0
len = 0, xfer_size = 0, mps = 8, xfer_type = 0
len = 8, xfer_size = 8, mps = 8, xfer_type = 0
len = 1, xfer_size = 1, mps = 8, xfer_type = 0
len = 0, xfer_size = 0, mps = 8, xfer_type = 0
len = 2, xfer_size = 2, mps = 2, xfer_type = 3
len = 64, xfer_size = 8, mps = 64, xfer_type = 3
Unable to handle kernel NULL pointer dereference at virtual address
00000000
pgd = c1134000
[00000000] *pgd=c11b2011, *pte=00000000, *ppte=00000000
Internal error: Oops: 807 [#1]
<...>




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to