On Wed, 24 Feb 2010, FEI YANG wrote: > Here are the values printed in qtd_copy_status() > actual 108, lenght 15548, QTD 15440 > > And the actual_length seen in our driver is also 108, so the > calculation seems to be correct, and there is no memory corruption. > The question is still "why it is not multiple of 512". Are you sure the device didn't send a short packet? > I'm thinking I might have mis-understood the EHCI spec. The spec says > when suspending the bus, the hardware would guarantee the current > transaction to be finished before bus suspend taking effect, but in > our case the driver is actually killing the urb before suspending the > bus, as usb_kill_urb is called in the driver's suspend function which > gets called before bus suspend. That's right. What happens during the bus suspend is irrelevant. > Maybe killing URB doesn't guarantee > the current transaction to be finished. URBs can't be killed in the middle of a transaction. It's possible that your EHCI controller has a hardware bug. Have you tried using a different controller from another manufacturer? > The actual_length is not the > only problem, afte usb_kill_urb the data in the buffer doesn't seem to > be correct either, looks like the controller hasn't updated the buffer > yet. That's another reason for thinking your controller might have a bug. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html