Skip to content

Commit cbfa3ef

Browse files
rmsilvagregkh
authored andcommitted
usb: isp1760: fix qtd fill length
When trying to send bulks bigger than the biggest block size we need to split them over several qtd. Fix this limiting the maximum qtd size to largest block size. Reported-by: Dietmar Eggemann <[email protected]> Tested-by: Dietmar Eggemann <[email protected]> Signed-off-by: Rui Miguel Silva <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f757f92 commit cbfa3ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/usb/isp1760/isp1760-hcd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,9 +1829,11 @@ static void packetize_urb(struct usb_hcd *hcd,
18291829
goto cleanup;
18301830

18311831
if (len > mem->blocks_size[ISP176x_BLOCK_NUM - 1])
1832-
len = mem->blocks_size[ISP176x_BLOCK_NUM - 1];
1832+
this_qtd_len = mem->blocks_size[ISP176x_BLOCK_NUM - 1];
1833+
else
1834+
this_qtd_len = len;
18331835

1834-
this_qtd_len = qtd_fill(qtd, buf, len);
1836+
this_qtd_len = qtd_fill(qtd, buf, this_qtd_len);
18351837
list_add_tail(&qtd->qtd_list, head);
18361838

18371839
len -= this_qtd_len;

0 commit comments

Comments
 (0)