Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/dwc2 Zeroise the whole urb including the is...



details:   https://anonhg.NetBSD.org/src/rev/04abb5d03be7
branches:  trunk
changeset: 791460:04abb5d03be7
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Nov 19 10:07:11 2013 +0000

description:
Zeroise the whole urb including the iso_descs array

diffstat:

 sys/external/bsd/dwc2/dwc2.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 7eb26a74f9fa -r 04abb5d03be7 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c      Tue Nov 19 07:51:56 2013 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c      Tue Nov 19 10:07:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2.c,v 1.19 2013/11/19 07:50:01 skrll Exp $  */
+/*     $NetBSD: dwc2.c,v 1.20 2013/11/19 10:07:11 skrll Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.19 2013/11/19 07:50:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.20 2013/11/19 10:07:11 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1294,7 +1294,8 @@
        if (!dwc2_urb)
                    return USBD_NOMEM;
 
-       memset(dwc2_urb, 0, sizeof(*dwc2_urb));
+       memset(dwc2_urb, 0, sizeof(*dwc2_urb) +
+           sizeof(dwc2_urb->iso_descs[0]) * DWC2_MAXISOCPACKETS);
 
        dwc2_urb->priv = xfer;
        dwc2_hcd_urb_set_pipeinfo(hsotg, dwc2_urb, addr, epnum, xfertype, dir,



Home | Main Index | Thread Index | Old Index