Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
}