mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
USB: fsl_usb2_udc: fix potential queue head corruption
Clear next TD field and status field in queue head initialization code to prevent unpredictable result caused by residue of usb reset. Signed-off-by: Li Yang <leoli@freescale.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
64e71303e4
commit
9a6e184c80
1 changed files with 3 additions and 0 deletions
|
@ -404,7 +404,10 @@ static void struct_ep_qh_setup(struct fsl_udc *udc, unsigned char ep_num,
|
|||
}
|
||||
if (zlt)
|
||||
tmp |= EP_QUEUE_HEAD_ZLT_SEL;
|
||||
|
||||
p_QH->max_pkt_length = cpu_to_le32(tmp);
|
||||
p_QH->next_dtd_ptr = 1;
|
||||
p_QH->size_ioc_int_sts = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue