Skip to content
Commit 577c867c authored by Niklas Neronin's avatar Niklas Neronin Committed by Greg Kroah-Hartman
Browse files

usb: xhci: improve debug message in xhci_ring_expansion_needed()



Address debug message inaccuracies in xhci_ring_expansion_needed().
Specifically, remove the portion of the debug message that indicates the
number of enqueue TRBs to be added to the dequeue segment. This part of
the message may mislead and the calculated value is incorrect. Given that
this value is not of significant importance and the statement is not
consistently accurate, it has been omitted.

The specific issues with the debug message that this commit resolves:
- The calculation of the number of TRBs is incorrect. The current
  calculation erroneously includes the link TRB, which is reserved.
  Furthermore, the calculated number of TRBs can exceed the dequeue
  segment, resulting in a misleading debug message.

- The current phrasing suggests that "ring expansion by X is needed,
  adding X TRBs moves enqueue Y TRBs into the dequeue segment".
  The intended message, however, is "IF the ring is NOT expanded by X,
  THEN adding X TRBs moves enqueue Y TRBs into the dequeue segment".

Signed-off-by: default avatarNiklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240429140245.3955523-5-mathias.nyman@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent db4460b6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment