Fri Feb 2 22:26:58 2024 UTC (107d)
s/mangement/management/ in comments.


(andvar)
diff -r1.58 -r1.59 src/sys/dev/ic/ispmbox.h
diff -r1.79 -r1.80 src/sys/dev/ic/mfi.c
diff -r1.110 -r1.111 src/sys/dev/pci/twe.c

cvs diff -r1.58 -r1.59 src/sys/dev/ic/ispmbox.h (expand / switch to unified diff)

--- src/sys/dev/ic/ispmbox.h 2023/09/21 09:31:50 1.58
+++ src/sys/dev/ic/ispmbox.h 2024/02/02 22:26:58 1.59
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ispmbox.h,v 1.58 2023/09/21 09:31:50 msaitoh Exp $ */ 1/* $NetBSD: ispmbox.h,v 1.59 2024/02/02 22:26:58 andvar Exp $ */
2/* 2/*
3 * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration 3 * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Additional Copyright (C) 2000-2007 by Matthew Jacob 6 * Additional Copyright (C) 2000-2007 by Matthew Jacob
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -1918,27 +1918,27 @@ typedef struct { @@ -1918,27 +1918,27 @@ typedef struct {
1918 uint32_t na_reserved; 1918 uint32_t na_reserved;
1919 uint16_t na_iid; /* initiator loop id */ 1919 uint16_t na_iid; /* initiator loop id */
1920 uint16_t na_response; /* response code */ 1920 uint16_t na_response; /* response code */
1921 uint16_t na_flags; 1921 uint16_t na_flags;
1922 uint16_t na_reserved2; 1922 uint16_t na_reserved2;
1923 uint16_t na_status; 1923 uint16_t na_status;
1924 uint16_t na_task_flags; 1924 uint16_t na_task_flags;
1925 uint16_t na_seqid; /* sequence id */ 1925 uint16_t na_seqid; /* sequence id */
1926 uint16_t na_reserved3[NA2_RSVDLEN]; 1926 uint16_t na_reserved3[NA2_RSVDLEN];
1927} na_fcentry_e_t; 1927} na_fcentry_e_t;
1928 1928
1929#define NAFC_RCOUNT 0x80 /* increment resource count */ 1929#define NAFC_RCOUNT 0x80 /* increment resource count */
1930#define NAFC_RST_CLRD 0x20 /* Clear LIP Reset */ 1930#define NAFC_RST_CLRD 0x20 /* Clear LIP Reset */
1931#define NAFC_TVALID 0x10 /* task mangement response code is valid */ 1931#define NAFC_TVALID 0x10 /* task management response code is valid */
1932 1932
1933/* 1933/*
1934 * ISP24XX Notify Acknowledge 1934 * ISP24XX Notify Acknowledge
1935 */ 1935 */
1936 1936
1937typedef struct { 1937typedef struct {
1938 isphdr_t na_header; 1938 isphdr_t na_header;
1939 uint32_t na_handle; 1939 uint32_t na_handle;
1940 uint16_t na_nphdl; 1940 uint16_t na_nphdl;
1941 uint16_t na_reserved1; 1941 uint16_t na_reserved1;
1942 uint16_t na_flags; 1942 uint16_t na_flags;
1943 uint16_t na_srr_rxid; 1943 uint16_t na_srr_rxid;
1944 uint16_t na_status; 1944 uint16_t na_status;

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

--- src/sys/dev/ic/mfi.c 2022/05/24 20:50:19 1.79
+++ src/sys/dev/ic/mfi.c 2024/02/02 22:26:58 1.80
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mfi.c,v 1.79 2022/05/24 20:50:19 andvar Exp $ */ 1/* $NetBSD: mfi.c,v 1.80 2024/02/02 22:26:58 andvar 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.79 2022/05/24 20:50:19 andvar Exp $"); 76__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.80 2024/02/02 22:26:58 andvar 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>
@@ -3364,27 +3364,27 @@ mfi_tbolt_create_sgl(struct mfi_ccb *ccb @@ -3364,27 +3364,27 @@ mfi_tbolt_create_sgl(struct mfi_ccb *ccb
3364 * 3364 *
3365 * Even though this driver doesn't access the disks directly, an 3365 * Even though this driver doesn't access the disks directly, an
3366 * AEN like command is used to inform the RAID firmware to "sync" 3366 * AEN like command is used to inform the RAID firmware to "sync"
3367 * with all LD's via the MFI_DCMD_LD_MAP_GET_INFO command. This 3367 * with all LD's via the MFI_DCMD_LD_MAP_GET_INFO command. This
3368 * command in write mode will return when the RAID firmware has 3368 * command in write mode will return when the RAID firmware has
3369 * detected a change to the RAID state. Examples of this type 3369 * detected a change to the RAID state. Examples of this type
3370 * of change are removing a disk. Once the command returns then 3370 * of change are removing a disk. Once the command returns then
3371 * the driver needs to acknowledge this and "sync" all LD's again. 3371 * the driver needs to acknowledge this and "sync" all LD's again.
3372 * This repeats until we shutdown. Then we need to cancel this 3372 * This repeats until we shutdown. Then we need to cancel this
3373 * pending command. 3373 * pending command.
3374 * 3374 *
3375 * If this is not done right the RAID firmware will not remove a 3375 * If this is not done right the RAID firmware will not remove a
3376 * pulled drive and the RAID won't go degraded etc. Effectively, 3376 * pulled drive and the RAID won't go degraded etc. Effectively,
3377 * stopping any RAID mangement to functions. 3377 * stopping any RAID management to functions.
3378 * 3378 *
3379 * Doing another LD sync, requires the use of an event since the 3379 * Doing another LD sync, requires the use of an event since the
3380 * driver needs to do a mfi_wait_command and can't do that in an 3380 * driver needs to do a mfi_wait_command and can't do that in an
3381 * interrupt thread. 3381 * interrupt thread.
3382 * 3382 *
3383 * The driver could get the RAID state via the MFI_DCMD_LD_MAP_GET_INFO 3383 * The driver could get the RAID state via the MFI_DCMD_LD_MAP_GET_INFO
3384 * That requires a bunch of structure and it is simpler to just do 3384 * That requires a bunch of structure and it is simpler to just do
3385 * the MFI_DCMD_LD_GET_LIST versus walking the RAID map. 3385 * the MFI_DCMD_LD_GET_LIST versus walking the RAID map.
3386 */ 3386 */
3387 3387
3388void 3388void
3389mfi_tbolt_sync_map_info(struct work *w, void *v) 3389mfi_tbolt_sync_map_info(struct work *w, void *v)
3390{ 3390{

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

--- src/sys/dev/pci/twe.c 2021/08/07 16:19:14 1.110
+++ src/sys/dev/pci/twe.c 2024/02/02 22:26:58 1.111
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: twe.c,v 1.110 2021/08/07 16:19:14 thorpej Exp $ */ 1/* $NetBSD: twe.c,v 1.111 2024/02/02 22:26:58 andvar 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.110 2021/08/07 16:19:14 thorpej Exp $"); 66__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.111 2024/02/02 22:26:58 andvar 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>
@@ -1004,27 +1004,27 @@ twe_aen_enqueue(struct twe_softc *sc, ui @@ -1004,27 +1004,27 @@ twe_aen_enqueue(struct twe_softc *sc, ui
1004 device_xname(sc->sc_dev), 1004 device_xname(sc->sc_dev),
1005 str[0] == 'u' ? "unit" : "port", 1005 str[0] == 'u' ? "unit" : "port",
1006 TWE_AEN_UNIT(aen), msg); 1006 TWE_AEN_UNIT(aen), msg);
1007 break; 1007 break;
1008 1008
1009 default: 1009 default:
1010 log(level, "%s: %s\n", 1010 log(level, "%s: %s\n",
1011 device_xname(sc->sc_dev), msg); 1011 device_xname(sc->sc_dev), msg);
1012 } 1012 }
1013 } 1013 }
1014 } 1014 }
1015 } 1015 }
1016 1016
1017 /* Now enqueue the AEN for mangement tools. */ 1017 /* Now enqueue the AEN for management tools. */
1018 s = splbio(); 1018 s = splbio();
1019 1019
1020 next = (sc->sc_aen_head + 1) % TWE_AEN_Q_LENGTH; 1020 next = (sc->sc_aen_head + 1) % TWE_AEN_Q_LENGTH;
1021 nextnext = (sc->sc_aen_head + 2) % TWE_AEN_Q_LENGTH; 1021 nextnext = (sc->sc_aen_head + 2) % TWE_AEN_Q_LENGTH;
1022 1022
1023 /* 1023 /*
1024 * If this is the last free slot, then queue up a "queue 1024 * If this is the last free slot, then queue up a "queue
1025 * full" message. 1025 * full" message.
1026 */ 1026 */
1027 if (nextnext == sc->sc_aen_tail) 1027 if (nextnext == sc->sc_aen_tail)
1028 aen = TWE_AEN_QUEUE_FULL; 1028 aen = TWE_AEN_QUEUE_FULL;
1029 1029
1030 if (next != sc->sc_aen_tail) { 1030 if (next != sc->sc_aen_tail) {