usb: cdnsp: Fixed setting last_trb incorrectly
authorJing Leng <jleng@ambarella.com>
Thu, 9 Jun 2022 02:11:34 +0000 (10:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 09:15:23 +0000 (11:15 +0200)
commit5c7578c39c3fffe85b7d15ca1cf8cf7ac38ec0c1
treefea4598da4c12228ec124b57c2f2f7e546211482
parentb337af3a4d6147000b7ca6b3438bf5c820849b37
usb: cdnsp: Fixed setting last_trb incorrectly

When ZLP occurs in bulk transmission, currently cdnsp will set last_trb
for the last two TRBs, it will trigger an error "ERROR Transfer event TRB
DMA ptr not part of current TD ...".

Fixes: e913aada0683 ("usb: cdnsp: Fixed issue with ZLP")
Cc: stable <stable@kernel.org>
Acked-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Jing Leng <jleng@ambarella.com>
Link: https://lore.kernel.org/r/20220609021134.1606-1-3090101217@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdnsp-ring.c