Sun Mar 28 20:31:05 2021 UTC ()
No need to pass interface or locators to config_found() in mfi_rescan().


(thorpej)
diff -r1.63.10.2 -r1.63.10.3 src/sys/dev/ic/mfi.c

cvs diff -r1.63.10.2 -r1.63.10.3 src/sys/dev/ic/mfi.c (expand / switch to unified diff)

--- src/sys/dev/ic/mfi.c 2021/03/22 16:23:45 1.63.10.2
+++ src/sys/dev/ic/mfi.c 2021/03/28 20:31:05 1.63.10.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mfi.c,v 1.63.10.2 2021/03/22 16:23:45 thorpej Exp $ */ 1/* $NetBSD: mfi.c,v 1.63.10.3 2021/03/28 20:31:05 thorpej Exp $ */
2/* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ 2/* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
3 3
4/* 4/*
5 * Copyright (c) 2012 Manuel Bouyer. 5 * Copyright (c) 2012 Manuel Bouyer.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -63,27 +63,27 @@ @@ -63,27 +63,27 @@
63 * EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 63 * EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
64 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 64 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
65 * PROFITS; OR BUSINESS INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY 65 * PROFITS; OR BUSINESS INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY
66 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 66 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
67 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 67 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
68 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 68 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
69 * 69 *
70 * The views and conclusions contained in the software and documentation 70 * The views and conclusions contained in the software and documentation
71 * are those of the authors and should not be interpreted as representing 71 * are those of the authors and should not be interpreted as representing
72 * official policies,either expressed or implied, of the FreeBSD Project. 72 * official policies,either expressed or implied, of the FreeBSD Project.
73 */ 73 */
74 74
75#include <sys/cdefs.h> 75#include <sys/cdefs.h>
76__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.63.10.2 2021/03/22 16:23:45 thorpej Exp $"); 76__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.63.10.3 2021/03/28 20:31:05 thorpej Exp $");
77 77
78#include "bio.h" 78#include "bio.h"
79 79
80#include <sys/param.h> 80#include <sys/param.h>
81#include <sys/systm.h> 81#include <sys/systm.h>
82#include <sys/buf.h> 82#include <sys/buf.h>
83#include <sys/ioctl.h> 83#include <sys/ioctl.h>
84#include <sys/device.h> 84#include <sys/device.h>
85#include <sys/kernel.h> 85#include <sys/kernel.h>
86#include <sys/malloc.h> 86#include <sys/malloc.h>
87#include <sys/proc.h> 87#include <sys/proc.h>
88#include <sys/cpu.h> 88#include <sys/cpu.h>
89#include <sys/conf.h> 89#include <sys/conf.h>
@@ -899,30 +899,27 @@ mfiminphys(struct buf *bp) @@ -899,30 +899,27 @@ mfiminphys(struct buf *bp)
899 if (bp->b_bcount > MFI_MAXFER) 899 if (bp->b_bcount > MFI_MAXFER)
900 bp->b_bcount = MFI_MAXFER; 900 bp->b_bcount = MFI_MAXFER;
901 minphys(bp); 901 minphys(bp);
902} 902}
903 903
904int 904int
905mfi_rescan(device_t self, const char *ifattr, const int *locators) 905mfi_rescan(device_t self, const char *ifattr, const int *locators)
906{ 906{
907 struct mfi_softc *sc = device_private(self); 907 struct mfi_softc *sc = device_private(self);
908 908
909 if (sc->sc_child != NULL) 909 if (sc->sc_child != NULL)
910 return 0; 910 return 0;
911 911
912 sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, 912 sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, CFARG_EOL);
913 CFARG_IATTR, ifattr, 
914 CFARG_LOCATORS, locators, 
915 CFARG_EOL); 
916 913
917 return 0; 914 return 0;
918} 915}
919 916
920void 917void
921mfi_childdetached(device_t self, device_t child) 918mfi_childdetached(device_t self, device_t child)
922{ 919{
923 struct mfi_softc *sc = device_private(self); 920 struct mfi_softc *sc = device_private(self);
924 921
925 KASSERT(self == sc->sc_dev); 922 KASSERT(self == sc->sc_dev);
926 KASSERT(child == sc->sc_child); 923 KASSERT(child == sc->sc_child);
927 924
928 if (child == sc->sc_child) 925 if (child == sc->sc_child)