Sat Aug 8 19:39:28 2020 UTC ()
make this compile without bio(4)


(jnemeth)
diff -r1.24 -r1.25 src/sys/dev/pci/mpii.c

cvs diff -r1.24 -r1.25 src/sys/dev/pci/mpii.c (expand / switch to unified diff)

--- src/sys/dev/pci/mpii.c 2019/11/28 17:09:10 1.24
+++ src/sys/dev/pci/mpii.c 2020/08/08 19:39:28 1.25
@@ -1,36 +1,36 @@ @@ -1,36 +1,36 @@
1/* $NetBSD: mpii.c,v 1.24 2019/11/28 17:09:10 maxv Exp $ */ 1/* $NetBSD: mpii.c,v 1.25 2020/08/08 19:39:28 jnemeth Exp $ */
2/* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ 2/* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */
3/* 3/*
4 * Copyright (c) 2010, 2012 Mike Belopuhov 4 * Copyright (c) 2010, 2012 Mike Belopuhov
5 * Copyright (c) 2009 James Giannoules 5 * Copyright (c) 2009 James Giannoules
6 * Copyright (c) 2005 - 2010 David Gwynne <dlg@openbsd.org> 6 * Copyright (c) 2005 - 2010 David Gwynne <dlg@openbsd.org>
7 * Copyright (c) 2005 - 2010 Marco Peereboom <marco@openbsd.org> 7 * Copyright (c) 2005 - 2010 Marco Peereboom <marco@openbsd.org>
8 * 8 *
9 * Permission to use, copy, modify, and distribute this software for any 9 * Permission to use, copy, modify, and distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above 10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies. 11 * copyright notice and this permission notice appear in all copies.
12 * 12 *
13 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 */ 20 */
21 21
22#include <sys/cdefs.h> 22#include <sys/cdefs.h>
23__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.24 2019/11/28 17:09:10 maxv Exp $"); 23__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.25 2020/08/08 19:39:28 jnemeth Exp $");
24 24
25#include "bio.h" 25#include "bio.h"
26 26
27#include <sys/param.h> 27#include <sys/param.h>
28#include <sys/systm.h> 28#include <sys/systm.h>
29#include <sys/buf.h> 29#include <sys/buf.h>
30#include <sys/device.h> 30#include <sys/device.h>
31#include <sys/ioctl.h> 31#include <sys/ioctl.h>
32#include <sys/malloc.h> 32#include <sys/malloc.h>
33#include <sys/kernel.h> 33#include <sys/kernel.h>
34#include <sys/mutex.h> 34#include <sys/mutex.h>
35#include <sys/condvar.h> 35#include <sys/condvar.h>
36#include <sys/dkio.h> 36#include <sys/dkio.h>
@@ -234,28 +234,30 @@ struct mpii_softc { @@ -234,28 +234,30 @@ struct mpii_softc {
234 u_int sc_reply_free_host_index; 234 u_int sc_reply_free_host_index;
235 kmutex_t sc_reply_free_mtx; 235 kmutex_t sc_reply_free_mtx;
236 236
237 struct mpii_rcb_list sc_evt_sas_queue; 237 struct mpii_rcb_list sc_evt_sas_queue;
238 kmutex_t sc_evt_sas_mtx; 238 kmutex_t sc_evt_sas_mtx;
239 struct workqueue *sc_evt_sas_wq; 239 struct workqueue *sc_evt_sas_wq;
240 struct work sc_evt_sas_work; 240 struct work sc_evt_sas_work;
241 241
242 struct mpii_rcb_list sc_evt_ack_queue; 242 struct mpii_rcb_list sc_evt_ack_queue;
243 kmutex_t sc_evt_ack_mtx; 243 kmutex_t sc_evt_ack_mtx;
244 struct workqueue *sc_evt_ack_wq; 244 struct workqueue *sc_evt_ack_wq;
245 struct work sc_evt_ack_work; 245 struct work sc_evt_ack_work;
246 246
 247#if NBIO > 0
247 struct sysmon_envsys *sc_sme; 248 struct sysmon_envsys *sc_sme;
248 envsys_data_t *sc_sensors; 249 envsys_data_t *sc_sensors;
 250#endif
249}; 251};
250 252
251static int mpii_match(device_t, cfdata_t, void *); 253static int mpii_match(device_t, cfdata_t, void *);
252static void mpii_attach(device_t, device_t, void *); 254static void mpii_attach(device_t, device_t, void *);
253static int mpii_detach(device_t, int); 255static int mpii_detach(device_t, int);
254static void mpii_childdetached(device_t, device_t); 256static void mpii_childdetached(device_t, device_t);
255static int mpii_rescan(device_t, const char *, const int *); 257static int mpii_rescan(device_t, const char *, const int *);
256 258
257static int mpii_intr(void *); 259static int mpii_intr(void *);
258 260
259CFATTACH_DECL3_NEW(mpii, sizeof(struct mpii_softc), 261CFATTACH_DECL3_NEW(mpii, sizeof(struct mpii_softc),
260 mpii_match, mpii_attach, mpii_detach, NULL, mpii_rescan, 262 mpii_match, mpii_attach, mpii_detach, NULL, mpii_rescan,
261 mpii_childdetached, DVF_DETACH_SHUTDOWN); 263 mpii_childdetached, DVF_DETACH_SHUTDOWN);