Mon Apr 1 06:20:40 2019 UTC ()
Fix typo in comment (s/numer/number/).


(msaitoh)
diff -r1.11 -r1.12 src/sys/arch/x86/pci/msipic.c
diff -r1.25 -r1.26 src/sys/dev/iscsi/iscsi_utils.c

cvs diff -r1.11 -r1.12 src/sys/arch/x86/pci/msipic.c (expand / switch to unified diff)

--- src/sys/arch/x86/pci/msipic.c 2017/07/28 14:26:50 1.11
+++ src/sys/arch/x86/pci/msipic.c 2019/04/01 06:20:40 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: msipic.c,v 1.11 2017/07/28 14:26:50 maxv Exp $ */ 1/* $NetBSD: msipic.c,v 1.12 2019/04/01 06:20:40 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2015 Internet Initiative Japan Inc. 4 * Copyright (c) 2015 Internet Initiative Japan Inc.
5 * All rights reserved. 5 * All rights reserved.
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.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.11 2017/07/28 14:26:50 maxv Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: msipic.c,v 1.12 2019/04/01 06:20:40 msaitoh Exp $");
31 31
32#include "opt_intrdebug.h" 32#include "opt_intrdebug.h"
33 33
34#include <sys/types.h> 34#include <sys/types.h>
35#include <sys/param.h> 35#include <sys/param.h>
36#include <sys/systm.h> 36#include <sys/systm.h>
37#include <sys/errno.h> 37#include <sys/errno.h>
38#include <sys/kmem.h> 38#include <sys/kmem.h>
39#include <sys/mutex.h> 39#include <sys/mutex.h>
40 40
41#include <dev/pci/pcivar.h> 41#include <dev/pci/pcivar.h>
42 42
43#include <machine/i82489reg.h> 43#include <machine/i82489reg.h>
@@ -84,27 +84,27 @@ struct msipic { @@ -84,27 +84,27 @@ struct msipic {
84 bus_size_t mp_bssize; 84 bus_size_t mp_bssize;
85 struct pic *mp_pic; 85 struct pic *mp_pic;
86 86
87 LIST_ENTRY(msipic) mp_list; 87 LIST_ENTRY(msipic) mp_list;
88}; 88};
89 89
90static kmutex_t msipic_list_lock; 90static kmutex_t msipic_list_lock;
91 91
92static LIST_HEAD(, msipic) msipic_list = 92static LIST_HEAD(, msipic) msipic_list =
93 LIST_HEAD_INITIALIZER(msipic_list); 93 LIST_HEAD_INITIALIZER(msipic_list);
94 94
95/* 95/*
96 * This struct managements "devid" to use the same "devid" for the device 96 * This struct managements "devid" to use the same "devid" for the device
97 * re-attached. If the device's bus number and device numer and function 97 * re-attached. If the device's bus number and device number and function
98 * number are equal, it is assumed re-attached. 98 * number are equal, it is assumed re-attached.
99 */ 99 */
100struct dev_last_used_seq { 100struct dev_last_used_seq {
101 bool ds_using; 101 bool ds_using;
102 int ds_bus; 102 int ds_bus;
103 int ds_dev; 103 int ds_dev;
104 int ds_fun; 104 int ds_fun;
105}; 105};
106/* The number of MSI/MSI-X devices supported by system. */ 106/* The number of MSI/MSI-X devices supported by system. */
107#define NUM_MSI_DEVS 256 107#define NUM_MSI_DEVS 256
108/* Record devids to use the same devid when the device is re-attached. */ 108/* Record devids to use the same devid when the device is re-attached. */
109static struct dev_last_used_seq dev_seqs[NUM_MSI_DEVS]; 109static struct dev_last_used_seq dev_seqs[NUM_MSI_DEVS];
110 110

cvs diff -r1.25 -r1.26 src/sys/dev/iscsi/iscsi_utils.c (expand / switch to unified diff)

--- src/sys/dev/iscsi/iscsi_utils.c 2019/02/01 08:33:29 1.25
+++ src/sys/dev/iscsi/iscsi_utils.c 2019/04/01 06:20:40 1.26
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: iscsi_utils.c,v 1.25 2019/02/01 08:33:29 mrg Exp $ */ 1/* $NetBSD: iscsi_utils.c,v 1.26 2019/04/01 06:20:40 msaitoh Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2004,2005,2006,2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2004,2005,2006,2008 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 Wasabi Systems, Inc. 8 * by 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.
@@ -561,27 +561,27 @@ init_sernum(sernum_buffer_t *buff) @@ -561,27 +561,27 @@ init_sernum(sernum_buffer_t *buff)
561/* 561/*
562 * add_sernum: 562 * add_sernum:
563 * Add a received serial number to the buffer. 563 * Add a received serial number to the buffer.
564 * If the serial number is smaller than the expected one, it is ignored. 564 * If the serial number is smaller than the expected one, it is ignored.
565 * If it is larger, all missing serial numbers are added as well. 565 * If it is larger, all missing serial numbers are added as well.
566 * 566 *
567 * Parameter: 567 * Parameter:
568 * buff The serial number buffer. 568 * buff The serial number buffer.
569 * num The received serial number 569 * num The received serial number
570 * 570 *
571 * Returns: 571 * Returns:
572 * 0 if the received block is a duplicate 572 * 0 if the received block is a duplicate
573 * 1 if the number is the expected one 573 * 1 if the number is the expected one
574 * >1 if the numer is > the expected value, in this case the 574 * >1 if the number is > the expected value, in this case the
575 * return value is the number of unacknowledged blocks 575 * return value is the number of unacknowledged blocks
576 * <0 if the buffer is full (i.e. an excessive number of blocks 576 * <0 if the buffer is full (i.e. an excessive number of blocks
577 * is unacknowledged) 577 * is unacknowledged)
578 */ 578 */
579 579
580int 580int
581add_sernum(sernum_buffer_t *buff, uint32_t num) 581add_sernum(sernum_buffer_t *buff, uint32_t num)
582{ 582{
583 int i, t, b; 583 int i, t, b;
584 uint32_t n; 584 uint32_t n;
585 int32_t diff; 585 int32_t diff;
586 586
587 /* 587 /*