Sun Mar 28 20:38:04 2021 UTC ()
Correct the names of the arguments passed to the rescan function.


(thorpej)
diff -r1.27 -r1.27.14.1 src/sys/dev/pci/mlx_pci.c
diff -r1.108.10.2 -r1.108.10.3 src/sys/dev/pci/twe.c

cvs diff -r1.27 -r1.27.14.1 src/sys/dev/pci/mlx_pci.c (expand / switch to unified diff)

--- src/sys/dev/pci/mlx_pci.c 2018/12/09 11:14:02 1.27
+++ src/sys/dev/pci/mlx_pci.c 2021/03/28 20:38:04 1.27.14.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $ */ 1/* $NetBSD: mlx_pci.c,v 1.27.14.1 2021/03/28 20:38:04 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -52,27 +52,27 @@ @@ -52,27 +52,27 @@
52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55 * SUCH DAMAGE. 55 * SUCH DAMAGE.
56 * 56 *
57 * from FreeBSD: mlx_pci.c,v 1.4.2.4 2000/10/28 10:48:09 msmith Exp 57 * from FreeBSD: mlx_pci.c,v 1.4.2.4 2000/10/28 10:48:09 msmith Exp
58 */ 58 */
59 59
60/* 60/*
61 * PCI front-end for the mlx(4) driver. 61 * PCI front-end for the mlx(4) driver.
62 */ 62 */
63 63
64#include <sys/cdefs.h> 64#include <sys/cdefs.h>
65__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $"); 65__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.27.14.1 2021/03/28 20:38:04 thorpej Exp $");
66 66
67#include <sys/param.h> 67#include <sys/param.h>
68#include <sys/systm.h> 68#include <sys/systm.h>
69#include <sys/kernel.h> 69#include <sys/kernel.h>
70#include <sys/device.h> 70#include <sys/device.h>
71#include <sys/queue.h> 71#include <sys/queue.h>
72#include <sys/callout.h> 72#include <sys/callout.h>
73#include <sys/module.h> 73#include <sys/module.h>
74 74
75#include <machine/endian.h> 75#include <machine/endian.h>
76#include <sys/bus.h> 76#include <sys/bus.h>
77 77
78#include <dev/ic/mlxreg.h> 78#include <dev/ic/mlxreg.h>
@@ -135,27 +135,27 @@ static struct mlx_pci_ident { @@ -135,27 +135,27 @@ static struct mlx_pci_ident {
135 0x0000, 135 0x0000,
136 4, 136 4,
137 }, 137 },
138 { 138 {
139 PCI_VENDOR_DEC, 139 PCI_VENDOR_DEC,
140 PCI_PRODUCT_DEC_SWXCR, 140 PCI_PRODUCT_DEC_SWXCR,
141 PCI_VENDOR_MYLEX, 141 PCI_VENDOR_MYLEX,
142 PCI_PRODUCT_MYLEX_RAID_V5, 142 PCI_PRODUCT_MYLEX_RAID_V5,
143 5, 143 5,
144 }, 144 },
145}; 145};
146 146
147static int 147static int
148mlx_pci_rescan(device_t self, const char *attr, const int *flag) 148mlx_pci_rescan(device_t self, const char *ifattr, const int *locs)
149{ 149{
150 150
151 return mlx_configure(device_private(self), 1); 151 return mlx_configure(device_private(self), 1);
152} 152}
153 153
154CFATTACH_DECL3_NEW(mlx_pci, sizeof(struct mlx_softc), 154CFATTACH_DECL3_NEW(mlx_pci, sizeof(struct mlx_softc),
155 mlx_pci_match, mlx_pci_attach, NULL, NULL, mlx_pci_rescan, NULL, 0); 155 mlx_pci_match, mlx_pci_attach, NULL, NULL, mlx_pci_rescan, NULL, 0);
156 156
157/* 157/*
158 * Try to find a `mlx_pci_ident' entry corresponding to this board. 158 * Try to find a `mlx_pci_ident' entry corresponding to this board.
159 */ 159 */
160static const struct mlx_pci_ident * 160static const struct mlx_pci_ident *
161mlx_pci_findmpi(struct pci_attach_args *pa) 161mlx_pci_findmpi(struct pci_attach_args *pa)

cvs diff -r1.108.10.2 -r1.108.10.3 src/sys/dev/pci/twe.c (expand / switch to unified diff)

--- src/sys/dev/pci/twe.c 2021/03/22 16:23:46 1.108.10.2
+++ src/sys/dev/pci/twe.c 2021/03/28 20:38:04 1.108.10.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: twe.c,v 1.108.10.2 2021/03/22 16:23:46 thorpej Exp $ */ 1/* $NetBSD: twe.c,v 1.108.10.3 2021/03/28 20:38:04 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc. 4 * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Doran; and by Jason R. Thorpe of Wasabi Systems, Inc. 8 * by Andrew Doran; and by Jason R. Thorpe of Wasabi Systems, Inc.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -53,27 +53,27 @@ @@ -53,27 +53,27 @@
53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 53 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 54 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 55 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 * SUCH DAMAGE. 56 * SUCH DAMAGE.
57 * 57 *
58 * from FreeBSD: twe.c,v 1.1 2000/05/24 23:35:23 msmith Exp 58 * from FreeBSD: twe.c,v 1.1 2000/05/24 23:35:23 msmith Exp
59 */ 59 */
60 60
61/* 61/*
62 * Driver for the 3ware Escalade family of RAID controllers. 62 * Driver for the 3ware Escalade family of RAID controllers.
63 */ 63 */
64 64
65#include <sys/cdefs.h> 65#include <sys/cdefs.h>
66__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.108.10.2 2021/03/22 16:23:46 thorpej Exp $"); 66__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.108.10.3 2021/03/28 20:38:04 thorpej Exp $");
67 67
68#include <sys/param.h> 68#include <sys/param.h>
69#include <sys/systm.h> 69#include <sys/systm.h>
70#include <sys/kernel.h> 70#include <sys/kernel.h>
71#include <sys/device.h> 71#include <sys/device.h>
72#include <sys/queue.h> 72#include <sys/queue.h>
73#include <sys/proc.h> 73#include <sys/proc.h>
74#include <sys/buf.h> 74#include <sys/buf.h>
75#include <sys/endian.h> 75#include <sys/endian.h>
76#include <sys/malloc.h> 76#include <sys/malloc.h>
77#include <sys/conf.h> 77#include <sys/conf.h>
78#include <sys/disk.h> 78#include <sys/disk.h>
79#include <sys/sysctl.h> 79#include <sys/sysctl.h>
@@ -441,27 +441,27 @@ twe_attach(device_t parent, device_t sel @@ -441,27 +441,27 @@ twe_attach(device_t parent, device_t sel
441 rv = twe_reset(sc); 441 rv = twe_reset(sc);
442 splx(s); 442 splx(s);
443 if (rv) { 443 if (rv) {
444 aprint_error_dev(self, "reset failed\n"); 444 aprint_error_dev(self, "reset failed\n");
445 return; 445 return;
446 } 446 }
447 447
448 /* Initialise connection with controller. */ 448 /* Initialise connection with controller. */
449 twe_init_connection(sc); 449 twe_init_connection(sc);
450 450
451 twe_describe_controller(sc); 451 twe_describe_controller(sc);
452 452
453 /* Find and attach RAID array units. */ 453 /* Find and attach RAID array units. */
454 twe_rescan(self, "twe", 0); 454 twe_rescan(self, NULL, NULL);
455 455
456 /* ...and finally, enable interrupts. */ 456 /* ...and finally, enable interrupts. */
457 twe_outl(sc, TWE_REG_CTL, TWE_CTL_CLEAR_ATTN_INTR | 457 twe_outl(sc, TWE_REG_CTL, TWE_CTL_CLEAR_ATTN_INTR |
458 TWE_CTL_UNMASK_RESP_INTR | 458 TWE_CTL_UNMASK_RESP_INTR |
459 TWE_CTL_ENABLE_INTRS); 459 TWE_CTL_ENABLE_INTRS);
460 460
461 /* sysctl set-up for 3ware cli */ 461 /* sysctl set-up for 3ware cli */
462 if (sysctl_createv(NULL, 0, NULL, &node, 462 if (sysctl_createv(NULL, 0, NULL, &node,
463 0, CTLTYPE_NODE, device_xname(self), 463 0, CTLTYPE_NODE, device_xname(self),
464 SYSCTL_DESCR("twe driver information"), 464 SYSCTL_DESCR("twe driver information"),
465 NULL, 0, NULL, 0, 465 NULL, 0, NULL, 0,
466 CTL_HW, CTL_CREATE, CTL_EOL) != 0) { 466 CTL_HW, CTL_CREATE, CTL_EOL) != 0) {
467 aprint_error_dev(self, "could not create %s.%s sysctl node\n", 467 aprint_error_dev(self, "could not create %s.%s sysctl node\n",
@@ -472,27 +472,27 @@ twe_attach(device_t parent, device_t sel @@ -472,27 +472,27 @@ twe_attach(device_t parent, device_t sel
472 0, CTLTYPE_STRING, "driver_version", 472 0, CTLTYPE_STRING, "driver_version",
473 SYSCTL_DESCR("twe0 driver version"), 473 SYSCTL_DESCR("twe0 driver version"),
474 NULL, 0, __UNCONST(&twever), 0, 474 NULL, 0, __UNCONST(&twever), 0,
475 CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL)) 475 CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL))
476 != 0) { 476 != 0) {
477 aprint_error_dev(self, 477 aprint_error_dev(self,
478 "could not create %s.%s.driver_version sysctl\n", 478 "could not create %s.%s.driver_version sysctl\n",
479 "hw", device_xname(self)); 479 "hw", device_xname(self));
480 return; 480 return;
481 } 481 }
482} 482}
483 483
484static int 484static int
485twe_rescan(device_t self, const char *attr, const int *flags) 485twe_rescan(device_t self, const char *ifattr, const int *locs)
486{ 486{
487 struct twe_softc *sc; 487 struct twe_softc *sc;
488 int i; 488 int i;
489 489
490 sc = device_private(self); 490 sc = device_private(self);
491 sc->sc_nunits = 0; 491 sc->sc_nunits = 0;
492 for (i = 0; i < TWE_MAX_UNITS; i++) 492 for (i = 0; i < TWE_MAX_UNITS; i++)
493 (void) twe_add_unit(sc, i); 493 (void) twe_add_unit(sc, i);
494 return 0; 494 return 0;
495} 495}
496 496
497 497
498void 498void