[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    USB: fsl_usb2_udc: fix potential queue head corruption
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2009-02-28 2:01:28
Message-ID: 200902280201.n1S21SV2012260 () hera ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9a6e184c804b33a2c2ea974efcd3c9798d30cb39
Commit:     9a6e184c804b33a2c2ea974efcd3c9798d30cb39
Parent:     64e71303e44f3697e4568147caa966de74bdb4fb
Author:     Li Yang <leoli@freescale.com>
AuthorDate: Fri Feb 13 16:14:39 2009 +0800
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Fri Feb 27 14:40:50 2009 -0800

    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>
---
 drivers/usb/gadget/fsl_usb2_udc.c |    3 +++
 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 f3c6703..d8d9a52 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;
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic