usb: dwc3: gadget: Cleanup SG handling
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 14 Nov 2024 01:02:24 +0000 (01:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Nov 2024 08:04:56 +0000 (09:04 +0100)
commit61440628a4ffe0639c4f69a6ffa46c3a0bead3d5
treea5bc38fa7081fd3e106879fbf7c0bb86b0c96635
parentb7fc65f5141c24785dc8c19249ca4efcf71b3524
usb: dwc3: gadget: Cleanup SG handling

The current logic in dwc3 driver is tracking req->num_queued_sgs and
req->sg. But they can be checked base on the num_pending_sgs and
num_trbs. They are redundant and can complicate the SG logic. Let's
remove them.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/96c7bf8f6b3e91e607d5b78ea51cb1d00c614eaf.1731545781.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c