Commit 9a6e184c authored by Li Yang's avatar Li Yang Committed by Greg Kroah-Hartman

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: default avatarLi Yang <leoli@freescale.com>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 64e71303
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment