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 Fix fallout from linux/gfp.h -> common.



details:   https://anonhg.NetBSD.org/src/rev/cc68820f8c80
branches:  trunk
changeset: 366447:cc68820f8c80
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 17:13:07 2018 +0000

description:
Fix fallout from linux/gfp.h -> common.

diffstat:

 sys/external/bsd/dwc2/dist/dwc2_hcd.c |  12 +++++++++---
 sys/external/bsd/dwc2/dwc2.h          |   6 +-----
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (54 lines):

diff -r 827d8de3228d -r cc68820f8c80 sys/external/bsd/dwc2/dist/dwc2_hcd.c
--- a/sys/external/bsd/dwc2/dist/dwc2_hcd.c     Mon Aug 27 16:46:13 2018 +0000
+++ b/sys/external/bsd/dwc2/dist/dwc2_hcd.c     Mon Aug 27 17:13:07 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2_hcd.c,v 1.21 2018/08/08 07:20:44 simonb Exp $     */
+/*     $NetBSD: dwc2_hcd.c,v 1.22 2018/08/27 17:13:07 riastradh Exp $  */
 
 /*
  * hcd.c - DesignWare HS OTG Controller host-mode routines
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.21 2018/08/08 07:20:44 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.22 2018/08/27 17:13:07 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/kmem.h>
@@ -1907,8 +1907,14 @@
        struct dwc2_hcd_urb *urb;
        u32 size = sizeof(*urb) + iso_desc_count *
                   sizeof(struct dwc2_hcd_iso_packet_desc);
+       int kmem_flag;
 
-       urb = kmem_zalloc(size, mem_flags);
+       if ((mem_flags & __GFP_WAIT) == __GFP_WAIT)
+               kmem_flag = KM_SLEEP;
+       else
+               kmem_flag = KM_NOSLEEP;
+
+       urb = kmem_zalloc(size, kmem_flag);
        if (urb)
                urb->packet_count = iso_desc_count;
        return urb;
diff -r 827d8de3228d -r cc68820f8c80 sys/external/bsd/dwc2/dwc2.h
--- a/sys/external/bsd/dwc2/dwc2.h      Mon Aug 27 16:46:13 2018 +0000
+++ b/sys/external/bsd/dwc2/dwc2.h      Mon Aug 27 17:13:07 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2.h,v 1.9 2016/02/24 22:17:54 skrll Exp $   */
+/*     $NetBSD: dwc2.h,v 1.10 2018/08/27 17:13:07 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -108,10 +108,6 @@
 #define jiffies                        hardclock_ticks
 #define msecs_to_jiffies       mstohz
 
-#define gfp_t          int
-#define GFP_KERNEL      KM_SLEEP
-#define GFP_ATOMIC      KM_NOSLEEP
-
 enum usb_otg_state {
        OTG_STATE_RESERVED = 0,
 



Home | Main Index | Thread Index | Old Index