From: Li Yang Date: Fri, 13 Feb 2009 08:14:39 +0000 (+0800) Subject: USB: fsl_usb2_udc: fix potential queue head corruption X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9a6e184c804b33a2c2ea974efcd3c9798d30cb39;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index f3c6703cffda..d8d9a52a44b3 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c @@ -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; }