OSDN Git Service

usb: dwc3: gadget: Correct handling of scattergather lists
authorAnurag Kumar Vulisha <anuragku@xilinx.com>
Tue, 27 Mar 2018 11:05:20 +0000 (16:35 +0530)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 21 May 2018 07:00:47 +0000 (10:00 +0300)
commita31e63b608ff78c77d8e033347239431d522fe5d
tree952ca738be9d8b99a03bbd91d8fff9c509400749
parent5f0b74e54890c354d6ac0124ea7a96adf22845d0
usb: dwc3: gadget: Correct handling of scattergather lists

The code logic in dwc3_prepare_one_trb() incorrectly uses the address
and length fields present in req packet for mapping TRB's instead of
using the address and length fields of scattergather lists. This patch
correct's the code to use sg->address and sg->length when scattergather
lists are present.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c