aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/fsl_usb2_udc.c
diff options
context:
space:
mode:
authorLi Yang <leoli@freescale.com>2009-02-13 03:14:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-27 17:40:50 -0500
commit9a6e184c804b33a2c2ea974efcd3c9798d30cb39 (patch)
treee25af5858e2c2b19c969d14675d64006cdba2030 /drivers/usb/gadget/fsl_usb2_udc.c
parent64e71303e44f3697e4568147caa966de74bdb4fb (diff)
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>
Diffstat (limited to 'drivers/usb/gadget/fsl_usb2_udc.c')
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c3
1 files changed, 3 insertions, 0 deletions
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,
404 } 404 }
405 if (zlt) 405 if (zlt)
406 tmp |= EP_QUEUE_HEAD_ZLT_SEL; 406 tmp |= EP_QUEUE_HEAD_ZLT_SEL;
407
407 p_QH->max_pkt_length = cpu_to_le32(tmp); 408 p_QH->max_pkt_length = cpu_to_le32(tmp);
409 p_QH->next_dtd_ptr = 1;
410 p_QH->size_ioc_int_sts = 0;
408 411
409 return; 412 return;
410} 413}