Module Name:    src
Committed By:   jdolecek
Date:           Fri Sep 16 15:20:50 UTC 2016

Modified Files:
        src/sys/dev: ld.c ldvar.h
        src/sys/dev/ata: ld_ataraid.c
        src/sys/dev/i2o: ld_iop.c
        src/sys/dev/ic: ld_aac.c ld_cac.c ld_icp.c ld_mlx.c ld_nvme.c
        src/sys/dev/pci: ld_amr.c ld_twa.c ld_twe.c ld_virtio.c
        src/sys/dev/sdmmc: ld_sdmmc.c

Log Message:
modify ldattach() to have default strategy as a parameter


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/ld.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ldvar.h
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/ata/ld_ataraid.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/i2o/ld_iop.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/ld_aac.c src/sys/dev/ic/ld_cac.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ic/ld_icp.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/ld_mlx.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/ld_nvme.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ld_amr.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ld_twa.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/ld_twe.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/ld_virtio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/sdmmc/ld_sdmmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ld.c
diff -u src/sys/dev/ld.c:1.94 src/sys/dev/ld.c:1.95
--- src/sys/dev/ld.c:1.94	Sat Feb 27 08:54:49 2016
+++ src/sys/dev/ld.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld.c,v 1.94 2016/02/27 08:54:49 mlelstv Exp $	*/
+/*	$NetBSD: ld.c,v 1.95 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.94 2016/02/27 08:54:49 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.95 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -122,7 +122,7 @@ static struct	dkdriver lddkdriver = {
 };
 
 void
-ldattach(struct ld_softc *sc)
+ldattach(struct ld_softc *sc, const char *default_strategy)
 {
 	device_t self = sc->sc_dv;
 	struct dk_softc *dksc = &sc->sc_dksc;
@@ -153,7 +153,7 @@ ldattach(struct ld_softc *sc)
 	disk_attach(&dksc->sc_dkdev);
 	ld_set_geometry(sc);
 
-	bufq_alloc(&dksc->sc_bufq, BUFQ_DISK_DEFAULT_STRAT, BUFQ_SORT_RAWBLOCK);
+	bufq_alloc(&dksc->sc_bufq, default_strategy, BUFQ_SORT_RAWBLOCK);
 
 	/* Register with PMF */
 	if (!pmf_device_register1(dksc->sc_dev, ld_suspend, NULL, ld_shutdown))

Index: src/sys/dev/ldvar.h
diff -u src/sys/dev/ldvar.h:1.27 src/sys/dev/ldvar.h:1.28
--- src/sys/dev/ldvar.h:1.27	Fri Aug 28 17:41:49 2015
+++ src/sys/dev/ldvar.h	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldvar.h,v 1.27 2015/08/28 17:41:49 mlelstv Exp $	*/
+/*	$NetBSD: ldvar.h,v 1.28 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ struct ld_softc {
 #define	LDFL_POLL	0x001		/* poll for completion */
 
 int	ldadjqparam(struct ld_softc *, int);
-void	ldattach(struct ld_softc *);
+void	ldattach(struct ld_softc *, const char *);
 int	ldbegindetach(struct ld_softc *, int);
 void	ldenddetach(struct ld_softc *);
 void	lddone(struct ld_softc *, struct buf *);

Index: src/sys/dev/ata/ld_ataraid.c
diff -u src/sys/dev/ata/ld_ataraid.c:1.41 src/sys/dev/ata/ld_ataraid.c:1.42
--- src/sys/dev/ata/ld_ataraid.c:1.41	Mon May  2 19:18:29 2016
+++ src/sys/dev/ata/ld_ataraid.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_ataraid.c,v 1.41 2016/05/02 19:18:29 christos Exp $	*/
+/*	$NetBSD: ld_ataraid.c,v 1.42 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.41 2016/05/02 19:18:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.42 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include "bio.h"
 
@@ -249,8 +249,8 @@ ld_ataraid_attach(device_t parent, devic
 		panic("%s: bioctl registration failed\n",
 		    device_xname(ld->sc_dv));
 #endif
-       SIMPLEQ_INIT(&sc->sc_cbufq);
-	ldattach(ld);
+	SIMPLEQ_INIT(&sc->sc_cbufq);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int

Index: src/sys/dev/i2o/ld_iop.c
diff -u src/sys/dev/i2o/ld_iop.c:1.35 src/sys/dev/i2o/ld_iop.c:1.36
--- src/sys/dev/i2o/ld_iop.c:1.35	Mon Apr 13 16:33:24 2015
+++ src/sys/dev/i2o/ld_iop.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_iop.c,v 1.35 2015/04/13 16:33:24 riastradh Exp $	*/
+/*	$NetBSD: ld_iop.c,v 1.36 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.35 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.36 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -266,7 +266,7 @@ ld_iop_attach(device_t parent, device_t 
 	else
 		aprint_error_dev(self, "device not yet supported\n");
 
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 	return;
 
  bad:

Index: src/sys/dev/ic/ld_aac.c
diff -u src/sys/dev/ic/ld_aac.c:1.28 src/sys/dev/ic/ld_aac.c:1.29
--- src/sys/dev/ic/ld_aac.c:1.28	Mon Apr 13 16:33:24 2015
+++ src/sys/dev/ic/ld_aac.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_aac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $	*/
+/*	$NetBSD: ld_aac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_aac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_aac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -95,7 +95,7 @@ ld_aac_attach(device_t parent, device_t 
 
 	aprint_normal(": %s\n",
 	    aac_describe_code(aac_container_types, hdr->hd_devtype));
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int
Index: src/sys/dev/ic/ld_cac.c
diff -u src/sys/dev/ic/ld_cac.c:1.28 src/sys/dev/ic/ld_cac.c:1.29
--- src/sys/dev/ic/ld_cac.c:1.28	Mon Apr 13 16:33:24 2015
+++ src/sys/dev/ic/ld_cac.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_cac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $	*/
+/*	$NetBSD: ld_cac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_cac.c,v 1.28 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_cac.c,v 1.29 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -130,7 +130,7 @@ ld_cac_attach(device_t parent, device_t 
 
 	/* XXX We should verify this... */
 	ld->sc_flags = LDF_ENABLED;
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 int

Index: src/sys/dev/ic/ld_icp.c
diff -u src/sys/dev/ic/ld_icp.c:1.27 src/sys/dev/ic/ld_icp.c:1.28
--- src/sys/dev/ic/ld_icp.c:1.27	Mon Apr 13 16:33:24 2015
+++ src/sys/dev/ic/ld_icp.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_icp.c,v 1.27 2015/04/13 16:33:24 riastradh Exp $	*/
+/*	$NetBSD: ld_icp.c,v 1.28 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.27 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.28 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -158,7 +158,7 @@ ld_icp_attach(device_t parent, device_t 
 	aprint_normal("status: %s\n", str);
 
  out:
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 int

Index: src/sys/dev/ic/ld_mlx.c
diff -u src/sys/dev/ic/ld_mlx.c:1.21 src/sys/dev/ic/ld_mlx.c:1.22
--- src/sys/dev/ic/ld_mlx.c:1.21	Mon Apr 13 16:33:24 2015
+++ src/sys/dev/ic/ld_mlx.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_mlx.c,v 1.21 2015/04/13 16:33:24 riastradh Exp $	*/
+/*	$NetBSD: ld_mlx.c,v 1.22 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_mlx.c,v 1.21 2015/04/13 16:33:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_mlx.c,v 1.22 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -127,7 +127,7 @@ ld_mlx_attach(device_t parent, device_t 
 	else
 		aprint_normal(": RAID%d, %s\n", ms->ms_raidlevel, statestr);
 
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int

Index: src/sys/dev/ic/ld_nvme.c
diff -u src/sys/dev/ic/ld_nvme.c:1.1 src/sys/dev/ic/ld_nvme.c:1.2
--- src/sys/dev/ic/ld_nvme.c:1.1	Sun May  1 10:21:02 2016
+++ src/sys/dev/ic/ld_nvme.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_nvme.c,v 1.1 2016/05/01 10:21:02 nonaka Exp $	*/
+/*	$NetBSD: ld_nvme.c,v 1.2 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (C) 2016 NONAKA Kimihiro <non...@netbsd.org>
@@ -26,13 +26,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.1 2016/05/01 10:21:02 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.2 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/device.h>
 #include <sys/buf.h>
+#include <sys/bufq.h>
 #include <sys/disk.h>
 #include <sys/kmem.h>
 
@@ -113,7 +114,7 @@ ld_nvme_attach(device_t parent, device_t
 	ld->sc_dump = ld_nvme_dump;
 	ld->sc_flush = ld_nvme_flush;
 	ld->sc_flags = LDF_ENABLED;
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int

Index: src/sys/dev/pci/ld_amr.c
diff -u src/sys/dev/pci/ld_amr.c:1.23 src/sys/dev/pci/ld_amr.c:1.24
--- src/sys/dev/pci/ld_amr.c:1.23	Mon Apr 13 16:33:25 2015
+++ src/sys/dev/pci/ld_amr.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_amr.c,v 1.23 2015/04/13 16:33:25 riastradh Exp $	*/
+/*	$NetBSD: ld_amr.c,v 1.24 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_amr.c,v 1.23 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_amr.c,v 1.24 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -107,7 +107,7 @@ ld_amr_attach(device_t parent, device_t 
 	    amr->amr_drive[sc->sc_hwunit].al_properties & AMR_DRV_RAID_MASK,
 	    statestr);
 
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 CFATTACH_DECL_NEW(ld_amr, sizeof(struct ld_amr_softc),

Index: src/sys/dev/pci/ld_twa.c
diff -u src/sys/dev/pci/ld_twa.c:1.17 src/sys/dev/pci/ld_twa.c:1.18
--- src/sys/dev/pci/ld_twa.c:1.17	Mon Apr 13 16:33:25 2015
+++ src/sys/dev/pci/ld_twa.c	Fri Sep 16 15:20:50 2016
@@ -1,5 +1,5 @@
 /*	$wasabi: ld_twa.c,v 1.9 2006/02/14 18:44:37 jordanr Exp $	*/
-/*	$NetBSD: ld_twa.c,v 1.17 2015/04/13 16:33:25 riastradh Exp $ */
+/*	$NetBSD: ld_twa.c,v 1.18 2016/09/16 15:20:50 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_twa.c,v 1.17 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_twa.c,v 1.18 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -119,7 +119,7 @@ ld_twa_attach(device_t parent, device_t 
 	ld->sc_start = ld_twa_start;
 	ld->sc_dump = ld_twa_dump;
 	ld->sc_flush = ld_twa_flush;
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int

Index: src/sys/dev/pci/ld_twe.c
diff -u src/sys/dev/pci/ld_twe.c:1.37 src/sys/dev/pci/ld_twe.c:1.38
--- src/sys/dev/pci/ld_twe.c:1.37	Mon Apr 13 16:33:25 2015
+++ src/sys/dev/pci/ld_twe.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_twe.c,v 1.37 2015/04/13 16:33:25 riastradh Exp $	*/
+/*	$NetBSD: ld_twe.c,v 1.38 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_twe.c,v 1.37 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_twe.c,v 1.38 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -148,7 +148,7 @@ ld_twe_attach(device_t parent, device_t 
 	}
 
 	aprint_normal(": %s%s, status: %s\n", stripebuf, typestr, statstr);
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 }
 
 static int

Index: src/sys/dev/pci/ld_virtio.c
diff -u src/sys/dev/pci/ld_virtio.c:1.10 src/sys/dev/pci/ld_virtio.c:1.11
--- src/sys/dev/pci/ld_virtio.c:1.10	Thu Jul  7 06:55:41 2016
+++ src/sys/dev/pci/ld_virtio.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_virtio.c,v 1.10 2016/07/07 06:55:41 msaitoh Exp $	*/
+/*	$NetBSD: ld_virtio.c,v 1.11 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,12 +26,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.10 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.11 2016/09/16 15:20:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/buf.h>
+#include <sys/bufq.h>
 #include <sys/bus.h>
 #include <sys/device.h>
 #include <sys/disk.h>
@@ -350,7 +351,7 @@ ld_virtio_attach(device_t parent, device
 	ld->sc_start = ld_virtio_start;
 
 	ld->sc_flags = LDF_ENABLED;
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 
 	return;
 

Index: src/sys/dev/sdmmc/ld_sdmmc.c
diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.21 src/sys/dev/sdmmc/ld_sdmmc.c:1.22
--- src/sys/dev/sdmmc/ld_sdmmc.c:1.21	Fri Aug 28 06:04:43 2015
+++ src/sys/dev/sdmmc/ld_sdmmc.c	Fri Sep 16 15:20:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_sdmmc.c,v 1.21 2015/08/28 06:04:43 mlelstv Exp $	*/
+/*	$NetBSD: ld_sdmmc.c,v 1.22 2016/09/16 15:20:50 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.21 2015/08/28 06:04:43 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.22 2016/09/16 15:20:50 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -147,7 +147,7 @@ ld_sdmmc_doattach(void *arg)
 	struct ld_softc *ld = &sc->sc_ld;
 	struct sdmmc_softc *ssc = device_private(device_parent(ld->sc_dv));
 
-	ldattach(ld);
+	ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 	aprint_normal_dev(ld->sc_dv, "%d-bit width,", sc->sc_sf->width);
 	if (ssc->sc_transfer_mode != NULL)
 		aprint_normal(" %s,", ssc->sc_transfer_mode);

Reply via email to