Hi Sarah, I have a series of 3 RFC patches here, which fix (or work around) some problems that we see in the TRB math when using our Synopsys XHCI controller. The first patch just changes the BUGs in xhci_find_new_dequeue_state() to WARN_ONs, to avoid bringing down the box when one of them is hit, which happens for us without the other 2 patches. The second patch rewrites some of the TRB math expressions from using "1 << TRB_MAX_BUFF_SHIFT" to "TRB_MAX_BUFF_SIZE" instead. This makes it more obvious that there are some problems in the math (I think). The patch also fixes those problems by ANDing the result with "TRB_MAX_BUFF_SIZE - 1" in 3 places. The final patch is needed, because even with the previous patch, we sometimes see the message "Miscalculated number of TRBs, 1 left", and the loop that is queuing the TRBs breaks out before setting the IOC bit in the last TRB. This seems relatively harmless with the NEC controller, but with the Synopsys controller it sometimes causes us to lose the interrupt, and the transfer times out after 30 seconds (in the case of a mass-storage device). And after that we hit one of the BUGs in xhci_find_new_dequeue_state(). I think the first 2 patches are OK, modulo any misunderstandings on my part. But the 3rd one should be replaced by a real fix to the TRB math, which I haven't been able to figure out yet. What do you think? Patches are against Linus' kernel as of yesterday. -- Paul -- 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