| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: viornd.c,v 1.1.2.2 2014/11/02 10:09:44 martin Exp $ */ | | 1 | /* $NetBSD: viornd.c,v 1.1.2.3 2015/11/06 22:52:55 riz Exp $ */ |
2 | /* $OpenBSD: viornd.c,v 1.1 2014/01/21 21:14:58 sf Exp $ */ | | 2 | /* $OpenBSD: viornd.c,v 1.1 2014/01/21 21:14:58 sf Exp $ */ |
3 | | | 3 | |
4 | /* | | 4 | /* |
5 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | | 5 | * Copyright (c) 2014 The NetBSD Foundation, Inc. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * This code is derived from software contributed to The NetBSD Foundation | | 8 | * This code is derived from software contributed to The NetBSD Foundation |
9 | * by Thor Lancelot Simon (tls@NetBSD.org). | | 9 | * by Thor Lancelot Simon (tls@NetBSD.org). |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -51,27 +51,27 @@ | | | @@ -51,27 +51,27 @@ |
51 | #include <sys/kernel.h> | | 51 | #include <sys/kernel.h> |
52 | #include <sys/device.h> | | 52 | #include <sys/device.h> |
53 | #include <sys/callout.h> | | 53 | #include <sys/callout.h> |
54 | #include <sys/rnd.h> | | 54 | #include <sys/rnd.h> |
55 | #include <sys/mutex.h> | | 55 | #include <sys/mutex.h> |
56 | #include <dev/pci/pcidevs.h> | | 56 | #include <dev/pci/pcidevs.h> |
57 | #include <dev/pci/pcivar.h> | | 57 | #include <dev/pci/pcivar.h> |
58 | #include <dev/pci/pcivar.h> | | 58 | #include <dev/pci/pcivar.h> |
59 | #include <dev/pci/virtioreg.h> | | 59 | #include <dev/pci/virtioreg.h> |
60 | #include <dev/pci/virtiovar.h> | | 60 | #include <dev/pci/virtiovar.h> |
61 | | | 61 | |
62 | #define VIORND_BUFSIZE 32 | | 62 | #define VIORND_BUFSIZE 32 |
63 | | | 63 | |
64 | #define VIORND_DEBUG 1 | | 64 | #define VIORND_DEBUG 0 |
65 | | | 65 | |
66 | struct viornd_softc { | | 66 | struct viornd_softc { |
67 | device_t sc_dev; | | 67 | device_t sc_dev; |
68 | struct virtio_softc *sc_virtio; | | 68 | struct virtio_softc *sc_virtio; |
69 | | | 69 | |
70 | kmutex_t sc_mutex; | | 70 | kmutex_t sc_mutex; |
71 | bool sc_active; | | 71 | bool sc_active; |
72 | | | 72 | |
73 | void *sc_buf; | | 73 | void *sc_buf; |
74 | struct virtqueue sc_vq; | | 74 | struct virtqueue sc_vq; |
75 | bus_dmamap_t sc_dmamap; | | 75 | bus_dmamap_t sc_dmamap; |
76 | krndsource_t sc_rndsource; | | 76 | krndsource_t sc_rndsource; |
77 | }; | | 77 | }; |