CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Wed Jul 15 02:26:07 UTC 2020 Modified Files: src/doc: CHANGES Log Message: Add missing note about Intel I219 LM10-LM15 and V10-V14. To generate a diff of this commit: cvs rdiff -u -r1.2713 -r1.2714 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2713 src/doc/CHANGES:1.2714 --- src/doc/CHANGES:1.2713 Tue Jul 14 17:40:10 2020 +++ src/doc/CHANGES Wed Jul 15 02:26:07 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2713 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2714 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -135,6 +135,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0: de(4): Removed from the tree. [thorpej 20200119] token ring and tr(4): Removed from the tree. [thorpej 20200119] fddi, fpa(4), fta(4), fea(4): Removed from the tree. [thorpej 20200120] + wm(4): Add Intel I219 LM10-LM15 and V10-V14. [msaitoh 20200121] OpenSSL: Imported 1.1.1d. [christos 20200122] dhcpcd(8): Import dhcpcd-8.1.6 [roy 20200127] openresolv(8): Import openresolv-3.10.0 [roy 20200127]
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Wed Jul 15 01:42:27 UTC 2020 Modified Files: src/sys/dev/ic: gem.c Log Message: G.C. comment. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/sys/dev/ic/gem.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/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.130 src/sys/dev/ic/gem.c:1.131 --- src/sys/dev/ic/gem.c:1.130 Sun Mar 15 22:19:00 2020 +++ src/sys/dev/ic/gem.c Wed Jul 15 01:42:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.130 2020/03/15 22:19:00 thorpej Exp $ */ +/* $NetBSD: gem.c,v 1.131 2020/07/15 01:42:27 msaitoh Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.130 2020/03/15 22:19:00 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.131 2020/07/15 01:42:27 msaitoh Exp $"); #include "opt_inet.h" @@ -880,7 +880,7 @@ gem_reset_tx(struct gem_softc *sc) bus_space_barrier(t, h, GEM_TX_CONFIG, 4, BUS_SPACE_BARRIER_WRITE); /* Wait till it finishes */ if (!gem_bitwait(sc, h, GEM_TX_CONFIG, 1, 0)) - aprint_error_dev(sc->sc_dev, "cannot disable tx dma\n"); /* OpenBSD 1.34 */ + aprint_error_dev(sc->sc_dev, "cannot disable tx dma\n"); /* Wait 5ms extra. */ delay(5000); @@ -889,7 +889,7 @@ gem_reset_tx(struct gem_softc *sc) bus_space_barrier(t, h, GEM_RESET, 4, BUS_SPACE_BARRIER_WRITE); /* Wait till it finishes */ if (!gem_bitwait(sc, h2, GEM_RESET, GEM_RESET_TX, 0)) { - aprint_error_dev(sc->sc_dev, "cannot reset transmitter\n"); /* OpenBSD 1.34 */ + aprint_error_dev(sc->sc_dev, "cannot reset transmitter\n"); return (1); } return (0);
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Wed Jul 15 00:51:40 UTC 2020 Modified Files: src/sys/stand/efiboot: efiboot.h efidev.c efifile.c Log Message: Fixup OpenSimpleReadFile usage: - The "EFI_DEVICE_PATH **FilePath" parameter can change, so do not free the output. This was causing crashes on U-Boot when attempting to load boot.cfg, even if it didn't exist. - Allocate the SIMPLE_READ_FILE in advance and store a pointer to it in struct open_file. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/stand/efiboot/efiboot.h cvs rdiff -u -r1.1 -r1.2 src/sys/stand/efiboot/efidev.c cvs rdiff -u -r1.4 -r1.5 src/sys/stand/efiboot/efifile.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/stand/efiboot/efiboot.h diff -u src/sys/stand/efiboot/efiboot.h:1.12 src/sys/stand/efiboot/efiboot.h:1.13 --- src/sys/stand/efiboot/efiboot.h:1.12 Fri Jun 26 03:23:04 2020 +++ src/sys/stand/efiboot/efiboot.h Wed Jul 15 00:51:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: efiboot.h,v 1.12 2020/06/26 03:23:04 thorpej Exp $ */ +/* $NetBSD: efiboot.h,v 1.13 2020/07/15 00:51:40 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -82,7 +82,8 @@ int ucs2_to_utf8(const CHAR16 *, char ** int utf8_to_ucs2(const char *, CHAR16 **, size_t *); /* efidev.c */ -int efi_device_path_depth(EFI_DEVICE_PATH *dp, int); +int efi_device_path_depth(EFI_DEVICE_PATH *, int); +int efi_device_path_count(EFI_DEVICE_PATH *); int efi_device_path_ncmp(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *, int); /* efinet.c */ Index: src/sys/stand/efiboot/efidev.c diff -u src/sys/stand/efiboot/efidev.c:1.1 src/sys/stand/efiboot/efidev.c:1.2 --- src/sys/stand/efiboot/efidev.c:1.1 Sun Aug 26 21:28:18 2018 +++ src/sys/stand/efiboot/efidev.c Wed Jul 15 00:51:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: efidev.c,v 1.1 2018/08/26 21:28:18 jmcneill Exp $ */ +/* $NetBSD: efidev.c,v 1.2 2020/07/15 00:51:40 jmcneill Exp $ */ /* $OpenBSD: efiboot.c,v 1.28 2017/11/25 19:02:07 patrick Exp $ */ /* @@ -37,6 +37,19 @@ efi_device_path_depth(EFI_DEVICE_PATH *d } int +efi_device_path_count(EFI_DEVICE_PATH *dp) +{ + int count; + + for (count = 0; ; dp = NextDevicePathNode(dp), count++) { + if (IsDevicePathEnd(dp)) + break; + } + + return (count); +} + +int efi_device_path_ncmp(EFI_DEVICE_PATH *dpa, EFI_DEVICE_PATH *dpb, int deptn) { int i, cmp; Index: src/sys/stand/efiboot/efifile.c diff -u src/sys/stand/efiboot/efifile.c:1.4 src/sys/stand/efiboot/efifile.c:1.5 --- src/sys/stand/efiboot/efifile.c:1.4 Sat Jun 27 17:23:08 2020 +++ src/sys/stand/efiboot/efifile.c Wed Jul 15 00:51:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: efifile.c,v 1.4 2020/06/27 17:23:08 jmcneill Exp $ */ +/* $NetBSD: efifile.c,v 1.5 2020/07/15 00:51:40 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -67,9 +67,9 @@ efi_file_system_probe(void) int efi_file_open(struct open_file *f, ...) { - EFI_DEVICE_PATH *dp; - SIMPLE_READ_FILE srf; - EFI_HANDLE device, file; + EFI_DEVICE_PATH *file_dp, *dp; + SIMPLE_READ_FILE *srf; + EFI_HANDLE device; EFI_STATUS status; UINTN vol; const char *fname, *path; @@ -86,30 +86,37 @@ efi_file_open(struct open_file *f, ...) if (rv != 0) return rv; - device = efi_vol[vol]; - upath = NULL; rv = utf8_to_ucs2(path, , ); if (rv != 0) return rv; - dp = FileDevicePath(device, upath); + file_dp = FileDevicePath(efi_vol[vol], upath); FreePool(upath); - if (dp == NULL) + if (file_dp == NULL) return EINVAL; - status = OpenSimpleReadFile(TRUE, NULL, 0, , , ); - FreePool(dp); - if (EFI_ERROR(status)) + srf = AllocatePool(sizeof(*srf)); + if (srf == NULL) + return ENOMEM; + + dp = file_dp; + status = OpenSimpleReadFile(FALSE, NULL, 0, , , srf); + FreePool(file_dp); + if (EFI_ERROR(status)) { + FreePool(srf); return status == EFI_NOT_FOUND ? ENOENT : EIO; + } for (n = 0; n < ndevs; n++) if (strcmp(DEV_NAME([n]), "efifile") == 0) { f->f_dev = [n]; break; } - if (n == ndevs) + if (n == ndevs) { + FreePool(srf); return ENXIO; + } f->f_devdata = f; f->f_fsdata = srf; f->f_flags = F_NODEV | F_READ; @@ -120,9 +127,10 @@ efi_file_open(struct open_file *f, ...) int efi_file_close(struct open_file *f) { - SIMPLE_READ_FILE srf = f->f_fsdata; + SIMPLE_READ_FILE *srf = f->f_fsdata; - CloseSimpleReadFile(srf); + CloseSimpleReadFile(*srf); + FreePool(srf); return 0; } @@ -131,7 +139,7 @@ int efi_file_strategy(void *devdata, int rw, daddr_t dblk, size_t size, void *buf, size_t *rsize) { struct open_file *f = devdata; - SIMPLE_READ_FILE srf = f->f_fsdata; + SIMPLE_READ_FILE *srf = f->f_fsdata; EFI_STATUS status; UINTN len; @@ -139,7 +147,7 @@ efi_file_strategy(void *devdata, int rw, return EROFS; len = size; - status = ReadSimpleReadFile(srf, f->f_offset, , buf); + status = ReadSimpleReadFile(*srf, f->f_offset, , buf); if (EFI_ERROR(status)) return
CVS commit: src/doc
Module Name:src Committed By: jdolecek Date: Tue Jul 14 17:40:10 UTC 2020 Modified Files: src/doc: CHANGES Log Message: note ciss(4) adapter match update To generate a diff of this commit: cvs rdiff -u -r1.2712 -r1.2713 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2712 src/doc/CHANGES:1.2713 --- src/doc/CHANGES:1.2712 Tue Jul 14 10:49:21 2020 +++ src/doc/CHANGES Tue Jul 14 17:40:10 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2712 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2713 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -249,3 +249,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: bnx(4): Enable support for MSI/MSI-X [jdolecek 20200714] ciss(4): Add support for PERFORMANT mode, and enable MSI/MSI-X for adapters supporting it [jdolecek 20200714] + ciss(4): Match new HP Smart Array adapters [jdolecek 20200714]
CVS commit: src/share/man/man4
Module Name:src Committed By: jdolecek Date: Tue Jul 14 17:39:19 UTC 2020 Modified Files: src/share/man/man4: ciss.4 Log Message: update list of matched adapters To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/ciss.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ciss.4 diff -u src/share/man/man4/ciss.4:1.10 src/share/man/man4/ciss.4:1.11 --- src/share/man/man4/ciss.4:1.10 Tue Oct 18 18:56:39 2016 +++ src/share/man/man4/ciss.4 Tue Jul 14 17:39:19 2020 @@ -1,11 +1,11 @@ -.\" $NetBSD: ciss.4,v 1.10 2016/10/18 18:56:39 maya Exp $ +.\" $NetBSD: ciss.4,v 1.11 2020/07/14 17:39:19 jdolecek Exp $ .\" Jonathan Stone, 2006. .\" .\" derived from: .\" $OpenBSD: ciss.4,v 1.4 2006/01/07 21:55:02 brad Exp $ .\" Michael Shalayeff, 2005. Public Domain. .\" -.Dd October 18, 2016 +.Dd July 14, 2020 .Dt CISS 4 .Os .Sh NAME @@ -70,7 +70,85 @@ HP Smart Array P800 .It HP Smart Array V100 .It -HP Smart Array 1 through 13 +HP Smart Array 1 through 14 +.It +HP Smart Array P700m +.It +HP Smart Array P212 +.It +HP Smart Array P410 +.It +HP Smart Array P410i +.It +HP Smart Array P411 +.It +HP Smart Array P822 +.It +HP Smart Array P712m +.It +HP Smart Array P222 +.It +HP Smart Array P420 +.It +HP Smart Array P421 +.It +HP Smart Array P822 +.It +HP Smart Array P420i +.It +HP Smart Array P220i +.It +HP Smart Array P721i +.It +HP Smart Array P430i +.It +HP Smart Array P830i +.It +HP Smart Array P430 +.It +HP Smart Array P431 +.It +HP Smart Array P830 +.It +HP Smart Array P731m +.It +HP Smart Array P230i +.It +HP Smart Array P530 +.It +HP Smart Array P531 +.It +HP Smart Array P244br +.It +HP Smart Array P741m +.It +HP Smart Array H240ar +.It +HP Smart Array H440ar +.It +HP Smart Array P840ar +.It +HP Smart Array P440 +.It +HP Smart Array P441 +.It +HP Smart Array P841 +.It +HP Smart Array H244br +.It +HP Smart Array H240 +.It +HP Smart Array H241 +.It +HP Smart Array P246br +.It +HP Smart Array P840 +.It +HP Smart Array P542d +.It +HP Smart Array P240nr +.It +HP Smart Array H240nr .El .Pp These controllers support RAID 0, RAID 1, RAID 5, JBOD,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jul 14 17:23:27 UTC 2020 Modified Files: src/sys/dev/pci: ciss_pci.c Log Message: fix __arraycount() parameter To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/ciss_pci.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/pci/ciss_pci.c diff -u src/sys/dev/pci/ciss_pci.c:1.20 src/sys/dev/pci/ciss_pci.c:1.21 --- src/sys/dev/pci/ciss_pci.c:1.20 Tue Jul 14 17:19:03 2020 +++ src/sys/dev/pci/ciss_pci.c Tue Jul 14 17:23:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss_pci.c,v 1.20 2020/07/14 17:19:03 jdolecek Exp $ */ +/* $NetBSD: ciss_pci.c,v 1.21 2020/07/14 17:23:27 jdolecek Exp $ */ /* $OpenBSD: ciss_pci.c,v 1.9 2005/12/13 15:56:01 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.20 2020/07/14 17:19:03 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.21 2020/07/14 17:23:27 jdolecek Exp $"); #include #include @@ -125,7 +125,7 @@ ciss_pci_attach(device_t parent, device_ sc->sc_dev = self; aprint_naive("\n"); - for (i = 0; i < __arraycount(ciss_pci_devices[i]); i++) + for (i = 0; i < __arraycount(ciss_pci_devices); i++) { if ((PCI_VENDOR(pa->pa_id) == ciss_pci_devices[i].vendor && PCI_PRODUCT(pa->pa_id) == ciss_pci_devices[i].product) ||
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jul 14 17:23:59 UTC 2020 Modified Files: src/sys/dev/pci: ciss_pci.c Log Message: match newer HP Smart Array controllers, list from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/ciss_pci.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/pci/ciss_pci.c diff -u src/sys/dev/pci/ciss_pci.c:1.21 src/sys/dev/pci/ciss_pci.c:1.22 --- src/sys/dev/pci/ciss_pci.c:1.21 Tue Jul 14 17:23:27 2020 +++ src/sys/dev/pci/ciss_pci.c Tue Jul 14 17:23:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss_pci.c,v 1.21 2020/07/14 17:23:27 jdolecek Exp $ */ +/* $NetBSD: ciss_pci.c,v 1.22 2020/07/14 17:23:58 jdolecek Exp $ */ /* $OpenBSD: ciss_pci.c,v 1.9 2005/12/13 15:56:01 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.21 2020/07/14 17:23:27 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.22 2020/07/14 17:23:58 jdolecek Exp $"); #include #include @@ -87,6 +87,46 @@ static const struct { CISS_PCI_DEVICE(HP, HPSA_11, "HP Smart Array 11"), CISS_PCI_DEVICE(HP, HPSA_12, "HP Smart Array 12"), CISS_PCI_DEVICE(HP, HPSA_13, "HP Smart Array 13"), + CISS_PCI_DEVICE(HP, HPSA_P700M, "Smart Array P700m"), + CISS_PCI_DEVICE(HP, HPSA_P212, "Smart Array P212"), + CISS_PCI_DEVICE(HP, HPSA_P410, "Smart Array P410"), + CISS_PCI_DEVICE(HP, HPSA_P410I, "Smart Array P410i"), + CISS_PCI_DEVICE(HP, HPSA_P411, "Smart Array P411"), + CISS_PCI_DEVICE(HP, HPSA_P812, "Smart Array P822"), + CISS_PCI_DEVICE(HP, HPSA_P712M, "Smart Array P712m"), + CISS_PCI_DEVICE(HP, HPSA_14, "Smart Array 14"), + CISS_PCI_DEVICE(HP, HPSA_P222, "Smart Array P222"), + CISS_PCI_DEVICE(HP, HPSA_P420, "Smart Array P420"), + CISS_PCI_DEVICE(HP, HPSA_P421, "Smart Array P421"), + CISS_PCI_DEVICE(HP, HPSA_P822, "Smart Array P822"), + CISS_PCI_DEVICE(HP, HPSA_P420I, "Smart Array P420i"), + CISS_PCI_DEVICE(HP, HPSA_P220I, "Smart Array P220i"), + CISS_PCI_DEVICE(HP, HPSA_P721I, "Smart Array P721i"), + CISS_PCI_DEVICE(HP, HPSA_P430I, "Smart Array P430i"), + CISS_PCI_DEVICE(HP, HPSA_P830I, "Smart Array P830i"), + CISS_PCI_DEVICE(HP, HPSA_P430, "Smart Array P430"), + CISS_PCI_DEVICE(HP, HPSA_P431, "Smart Array P431"), + CISS_PCI_DEVICE(HP, HPSA_P830, "Smart Array P830"), + CISS_PCI_DEVICE(HP, HPSA_P731M, "Smart Array P731m"), + CISS_PCI_DEVICE(HP, HPSA_P230I, "Smart Array P230i"), + CISS_PCI_DEVICE(HP, HPSA_P530, "Smart Array P530"), + CISS_PCI_DEVICE(HP, HPSA_P531, "Smart Array P531"), + CISS_PCI_DEVICE(HP, HPSA_P244BR, "Smart Array P244br"), + CISS_PCI_DEVICE(HP, HPSA_P741M, "Smart Array P741m"), + CISS_PCI_DEVICE(HP, HPSA_H240AR, "Smart Array H240ar"), + CISS_PCI_DEVICE(HP, HPSA_P440AR, "Smart Array H440ar"), + CISS_PCI_DEVICE(HP, HPSA_P840AR, "Smart Array P840ar"), + CISS_PCI_DEVICE(HP, HPSA_P440, "Smart Array P440"), + CISS_PCI_DEVICE(HP, HPSA_P441, "Smart Array P441"), + CISS_PCI_DEVICE(HP, HPSA_P841, "Smart Array P841"), + CISS_PCI_DEVICE(HP, HPSA_H244BR, "Smart Array H244br"), + CISS_PCI_DEVICE(HP, HPSA_H240, "Smart Array H240"), + CISS_PCI_DEVICE(HP, HPSA_H241, "Smart Array H241"), + CISS_PCI_DEVICE(HP, HPSA_P246BR, "Smart Array P246br"), + CISS_PCI_DEVICE(HP, HPSA_P840, "Smart Array P840"), + CISS_PCI_DEVICE(HP, HPSA_P542D, "Smart Array P542d"), + CISS_PCI_DEVICE(HP, HPSA_P240NR, "Smart Array P240nr"), + CISS_PCI_DEVICE(HP, HPSA_H240NR, "Smart Array H240nr"), }; int
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jul 14 17:19:03 UTC 2020 Modified Files: src/sys/dev/pci: ciss_pci.c Log Message: make ciss_pci_devices[] more compact To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/ciss_pci.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/pci/ciss_pci.c diff -u src/sys/dev/pci/ciss_pci.c:1.19 src/sys/dev/pci/ciss_pci.c:1.20 --- src/sys/dev/pci/ciss_pci.c:1.19 Tue Jul 14 12:04:46 2020 +++ src/sys/dev/pci/ciss_pci.c Tue Jul 14 17:19:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss_pci.c,v 1.19 2020/07/14 12:04:46 jdolecek Exp $ */ +/* $NetBSD: ciss_pci.c,v 1.20 2020/07/14 17:19:03 jdolecek Exp $ */ /* $OpenBSD: ciss_pci.c,v 1.9 2005/12/13 15:56:01 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.19 2020/07/14 12:04:46 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.20 2020/07/14 17:19:03 jdolecek Exp $"); #include #include @@ -47,181 +47,46 @@ void ciss_pci_attach(device_t, device_t, CFATTACH_DECL_NEW(ciss_pci, sizeof(struct ciss_softc), ciss_pci_match, ciss_pci_attach, NULL, NULL); -const struct { + +static const struct { int vendor; int product; const char *name; } ciss_pci_devices[] = { - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA532, - "Compaq Smart Array 532" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA5300, - "Compaq Smart Array 5300 V1" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA5300_2, - "Compaq Smart Array 5300 V2" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA5312, - "Compaq Smart Array 5312" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA5i, - "Compaq Smart Array 5i" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA5i_2, - "Compaq Smart Array 5i V2" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA6i, - "Compaq Smart Array 6i" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA641, - "Compaq Smart Array 641" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA642, - "Compaq Smart Array 642" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA6400, - "Compaq Smart Array 6400" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA6400EM, - "Compaq Smart Array 6400EM" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA6422, - "Compaq Smart Array 6422" - }, - { - PCI_VENDOR_COMPAQ, - PCI_PRODUCT_COMPAQ_CSA64XX, - "Compaq Smart Array 64XX" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSAE200, - "Smart Array E200" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSAE200I_1, - "HP Smart Array E200I-1" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSAE200I_2, - "HP Smart Array E200I-2" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSAE200I_3, - "HP Smart Array E200I-3" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSAP600, - "HP Smart Array P600" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSAP800, - "HP Smart Array P800" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSAV100, - "HP Smart Array V100" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_1, - "HP Smart Array 1" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_2, - "HP Smart Array 2" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_3, - "HP Smart Array 3" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_4, - "HP Smart Array 4" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_5, - "HP Smart Array 5" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_6, - "HP Smart Array 6" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_7, - "HP Smart Array 7" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_8, - "HP Smart Array 8" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_9, - "HP Smart Array 9" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_10, - "HP Smart Array 10" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_11, - "HP Smart Array 11" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_12, - "HP Smart Array 12" - }, - { - PCI_VENDOR_HP, - PCI_PRODUCT_HP_HPSA_13, - "HP Smart Array 13" - }, - { - 0, - 0, - NULL - } +#define CISS_PCI_DEVICE(v, p, d) { PCI_VENDOR_##v, PCI_PRODUCT_##v##_##p, d } + CISS_PCI_DEVICE(COMPAQ, CSA532, "Compaq Smart Array 532"), + CISS_PCI_DEVICE(COMPAQ, CSA5300, "Compaq Smart Array 5300 V1"), + CISS_PCI_DEVICE(COMPAQ, CSA5300_2, "Compaq Smart Array 5300 V2"), + CISS_PCI_DEVICE(COMPAQ, CSA5312, "Compaq Smart Array 5312"), + CISS_PCI_DEVICE(COMPAQ, CSA5i, "Compaq Smart Array 5i"), + CISS_PCI_DEVICE(COMPAQ, CSA5i_2, "Compaq Smart Array 5i V2"), + CISS_PCI_DEVICE(COMPAQ, CSA6i, "Compaq Smart Array 6i"), + CISS_PCI_DEVICE(COMPAQ, CSA641, "Compaq Smart Array 641"), + CISS_PCI_DEVICE(COMPAQ, CSA642, "Compaq Smart Array 642"), + CISS_PCI_DEVICE(COMPAQ, CSA6400, "Compaq Smart Array 6400"), + CISS_PCI_DEVICE(COMPAQ, CSA6400EM, "Compaq Smart Array 6400EM"), + CISS_PCI_DEVICE(COMPAQ, CSA6422, "Compaq Smart Array 6422"), +
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jul 14 16:56:35 UTC 2020 Modified Files: src/sys/dev/pci: pcidevs Log Message: add newer ciss(4) devices, list obtained from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.1418 -r1.1419 src/sys/dev/pci/pcidevs 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/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1418 src/sys/dev/pci/pcidevs:1.1419 --- src/sys/dev/pci/pcidevs:1.1418 Thu Jul 9 08:39:46 2020 +++ src/sys/dev/pci/pcidevs Tue Jul 14 16:56:35 2020 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1418 2020/07/09 08:39:46 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1419 2020/07/14 16:56:35 jdolecek Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -2934,6 +2934,46 @@ product HP HPSA_10 0x3239 Smart Array product HP HPSA_11 0x323a Smart Array product HP HPSA_12 0x323b Smart Array product HP HPSA_13 0x323c Smart Array +product HP HPSA_P700M 0x323d Smart Array P700m +product HP HPSA_P212 0x3241 Smart Array P212 +product HP HPSA_P410 0x3243 Smart Array P410 +product HP HPSA_P410I 0x3245 Smart Array P410i +product HP HPSA_P411 0x3247 Smart Array P411 +product HP HPSA_P812 0x3249 Smart Array P822 +product HP HPSA_P712M 0x324a Smart Array P712m +product HP HPSA_14 0x324b Smart Array +product HP HPSA_P222 0x3350 Smart Array P222 +product HP HPSA_P420 0x3351 Smart Array P420 +product HP HPSA_P421 0x3352 Smart Array P421 +product HP HPSA_P822 0x3353 Smart Array P822 +product HP HPSA_P420I 0x3354 Smart Array P420i +product HP HPSA_P220I 0x3355 Smart Array P220i +product HP HPSA_P721I 0x3356 Smart Array P721i +product HP HPSA_P430I 0x1920 Smart Array P430i +product HP HPSA_P830I 0x1921 Smart Array P830i +product HP HPSA_P430 0x1922 Smart Array P430 +product HP HPSA_P431 0x1923 Smart Array P431 +product HP HPSA_P830 0x1924 Smart Array P830 +product HP HPSA_P731M 0x1926 Smart Array P731m +product HP HPSA_P230I 0x1928 Smart Array P230i +product HP HPSA_P530 0x1929 Smart Array P530 +product HP HPSA_P531 0x192A Smart Array P531 +product HP HPSA_P244BR 0x21bd Smart Array P244br +product HP HPSA_P741M 0x21be Smart Array P741m +product HP HPSA_H240AR 0x21bf Smart Array H240ar +product HP HPSA_P440AR 0x21c0 Smart Array H440ar +product HP HPSA_P840AR 0x21c1 Smart Array P840ar +product HP HPSA_P440 0x21c2 Smart Array P440 +product HP HPSA_P441 0x21c3 Smart Array P441 +product HP HPSA_P841 0x21c5 Smart Array P841 +product HP HPSA_H244BR 0x21c6 Smart Array H244br +product HP HPSA_H240 0x21c7 Smart Array H240 +product HP HPSA_H241 0x21c8 Smart Array H241 +product HP HPSA_P246BR 0x21ca Smart Array P246br +product HP HPSA_P840 0x21cb Smart Array P840 +product HP HPSA_P542D 0x21cc Smart Array P542d +product HP HPSA_P240NR 0x21cd Smart Array P240nr +product HP HPSA_H240NR 0x21ce Smart Array H240nr product HP USB 0x3300 iLO3 Virtual USB product HP IPMI 0x3302 IPMI product HP ILO3_SLAVE 0x3306 iLO3 Slave
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: para Date: Tue Jul 14 15:59:21 UTC 2020 Modified Files: src/sys/arch/x86/x86: idt.c Log Message: mark diagused variable as such fixing non DIAGNOSTIC builds To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/x86/idt.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/arch/x86/x86/idt.c diff -u src/sys/arch/x86/x86/idt.c:1.13 src/sys/arch/x86/x86/idt.c:1.14 --- src/sys/arch/x86/x86/idt.c:1.13 Tue Jul 14 00:45:53 2020 +++ src/sys/arch/x86/x86/idt.c Tue Jul 14 15:59:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: idt.c,v 1.13 2020/07/14 00:45:53 yamaguchi Exp $ */ +/* $NetBSD: idt.c,v 1.14 2020/07/14 15:59:21 para Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2009 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: idt.c,v 1.13 2020/07/14 00:45:53 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: idt.c,v 1.14 2020/07/14 15:59:21 para Exp $"); #include "opt_pcpu_idt.h" @@ -198,7 +198,7 @@ void idt_vec_set(struct idt_vec *iv, int vec, void (*function)(void)) { idt_descriptor_t *idt; - char *idt_allocmap = iv->iv_allocmap; + char *idt_allocmap __diagused = iv->iv_allocmap; KASSERT(idt_allocmap[vec] == 1); idt = iv->iv_idt;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jul 14 15:37:40 UTC 2020 Modified Files: src/sys/dev/pci: if_bnx.c if_bnxvar.h Log Message: make bnx_wk (used to trigger bnx_alloc_pkts()) part of softc instead of using a static variable, so it's independant for each adapter To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/dev/pci/if_bnx.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/if_bnxvar.h 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/pci/if_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.98 src/sys/dev/pci/if_bnx.c:1.99 --- src/sys/dev/pci/if_bnx.c:1.98 Tue Jul 14 12:15:16 2020 +++ src/sys/dev/pci/if_bnx.c Tue Jul 14 15:37:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.98 2020/07/14 12:15:16 jdolecek Exp $ */ +/* $NetBSD: if_bnx.c,v 1.99 2020/07/14 15:37:40 jdolecek Exp $ */ /* $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.98 2020/07/14 12:15:16 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.99 2020/07/14 15:37:40 jdolecek Exp $"); /* * The following controllers are supported by this driver: @@ -5118,7 +5118,6 @@ bnx_tx_encap(struct bnx_softc *sc, struc #endif uint32_t addr, prod_bseq; int i, error; - static struct work bnx_wk; /* Dummy work. Statically allocated. */ bool remap = true; mutex_enter(>tx_pkt_mtx); @@ -5131,7 +5130,7 @@ bnx_tx_encap(struct bnx_softc *sc, struc if (sc->tx_pkt_count <= TOTAL_TX_BD && !ISSET(sc->bnx_flags, BNX_ALLOC_PKTS_FLAG)) { - workqueue_enqueue(sc->bnx_wq, _wk, NULL); + workqueue_enqueue(sc->bnx_wq, >bnx_wk, NULL); SET(sc->bnx_flags, BNX_ALLOC_PKTS_FLAG); } Index: src/sys/dev/pci/if_bnxvar.h diff -u src/sys/dev/pci/if_bnxvar.h:1.13 src/sys/dev/pci/if_bnxvar.h:1.14 --- src/sys/dev/pci/if_bnxvar.h:1.13 Sun Jul 12 19:05:32 2020 +++ src/sys/dev/pci/if_bnxvar.h Tue Jul 14 15:37:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnxvar.h,v 1.13 2020/07/12 19:05:32 jdolecek Exp $ */ +/* $NetBSD: if_bnxvar.h,v 1.14 2020/07/14 15:37:40 jdolecek Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. @@ -129,6 +129,7 @@ struct bnx_softc /* packet allocation workqueue */ struct workqueue *bnx_wq; + struct work bnx_wk; /* ASIC Chip ID. */ uint32_t bnx_chipid;
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue Jul 14 13:40:37 UTC 2020 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1574 To generate a diff of this commit: cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.19 src/doc/CHANGES-8.3:1.1.2.20 --- src/doc/CHANGES-8.3:1.1.2.19 Mon Jul 13 14:37:41 2020 +++ src/doc/CHANGES-8.3 Tue Jul 14 13:40:37 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.19 2020/07/13 14:37:41 martin Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.20 2020/07/14 13:40:37 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -280,3 +280,8 @@ sys/dev/usb/ualea.c1.12 function. [simonb, ticket #1573] +lib/libcurses/newwin.c1.58 + + PR 55484: newwin() - fix crash with negative ncols. + [uwe, ticket #1574] +
CVS commit: [netbsd-8] src/lib/libcurses
Module Name:src Committed By: martin Date: Tue Jul 14 13:39:09 UTC 2020 Modified Files: src/lib/libcurses [netbsd-8]: newwin.c Log Message: Pull up following revision(s) (requested by uwe in ticket #1574): lib/libcurses/newwin.c: revision 1.58 newwin - fix crash with negative ncols. When support for negative nrows/ncols was added, one s/ncols/maxx/ was missed so we ended up passing negative (i.e. huge unsigned) length when hashing the line contents. Reported by Naman Jain in PR lib/55484 To generate a diff of this commit: cvs rdiff -u -r1.50.6.3 -r1.50.6.4 src/lib/libcurses/newwin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/newwin.c diff -u src/lib/libcurses/newwin.c:1.50.6.3 src/lib/libcurses/newwin.c:1.50.6.4 --- src/lib/libcurses/newwin.c:1.50.6.3 Tue Oct 9 10:01:38 2018 +++ src/lib/libcurses/newwin.c Tue Jul 14 13:39:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: newwin.c,v 1.50.6.3 2018/10/09 10:01:38 martin Exp $ */ +/* $NetBSD: newwin.c,v 1.50.6.4 2020/07/14 13:39:09 martin Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94"; #else -__RCSID("$NetBSD: newwin.c,v 1.50.6.3 2018/10/09 10:01:38 martin Exp $"); +__RCSID("$NetBSD: newwin.c,v 1.50.6.4 2020/07/14 13:39:09 martin Exp $"); #endif #endif/* not lint */ @@ -174,7 +174,7 @@ __newwin(SCREEN *screen, int nlines, int #endif /* HAVE_WCHAR */ } lp->hash = __hash((char *)(void *)lp->line, - (size_t)(ncols * __LDATASIZE)); + (size_t)(maxx * __LDATASIZE)); } return (win); }
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Tue Jul 14 13:38:12 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Ticket #1004 To generate a diff of this commit: cvs rdiff -u -r1.1.2.76 -r1.1.2.77 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.76 src/doc/CHANGES-9.1:1.1.2.77 --- src/doc/CHANGES-9.1:1.1.2.76 Mon Jul 13 14:34:30 2020 +++ src/doc/CHANGES-9.1 Tue Jul 14 13:38:12 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.76 2020/07/13 14:34:30 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.77 2020/07/14 13:38:12 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -3375,3 +3375,8 @@ sys/dev/usb/ualea.c1.12 function. [simonb, ticket #1003] +lib/libcurses/newwin.c1.58 + + PR 55484: newwin() - fix crash with negative ncols. + [uwe, ticket #1004] +
CVS commit: [netbsd-9] src/lib/libcurses
Module Name:src Committed By: martin Date: Tue Jul 14 13:37:18 UTC 2020 Modified Files: src/lib/libcurses [netbsd-9]: newwin.c Log Message: Pull up following revision(s) (requested by uwe in ticket #1004): lib/libcurses/newwin.c: revision 1.58 newwin - fix crash with negative ncols. When support for negative nrows/ncols was added, one s/ncols/maxx/ was missed so we ended up passing negative (i.e. huge unsigned) length when hashing the line contents. Reported by Naman Jain in PR lib/55484 To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.57.2.1 src/lib/libcurses/newwin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/newwin.c diff -u src/lib/libcurses/newwin.c:1.57 src/lib/libcurses/newwin.c:1.57.2.1 --- src/lib/libcurses/newwin.c:1.57 Sun Jun 9 07:40:14 2019 +++ src/lib/libcurses/newwin.c Tue Jul 14 13:37:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: newwin.c,v 1.57 2019/06/09 07:40:14 blymn Exp $ */ +/* $NetBSD: newwin.c,v 1.57.2.1 2020/07/14 13:37:18 martin Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94"; #else -__RCSID("$NetBSD: newwin.c,v 1.57 2019/06/09 07:40:14 blymn Exp $"); +__RCSID("$NetBSD: newwin.c,v 1.57.2.1 2020/07/14 13:37:18 martin Exp $"); #endif #endif/* not lint */ @@ -174,7 +174,7 @@ __newwin(SCREEN *screen, int nlines, int #endif /* HAVE_WCHAR */ } lp->hash = __hash((char *)(void *)lp->line, - (size_t)(ncols * __LDATASIZE)); + (size_t)(maxx * __LDATASIZE)); } return (win); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jul 14 12:15:16 UTC 2020 Modified Files: src/sys/dev/pci: if_bnx.c Log Message: remove call to bnx_alloc_pkts() from bnx_init_tx_chain() - it can be called from softint context via bnx_watchdog(), and bnx_alloc_pkts() dmamap allocation can't run in (soft)interrupt context To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/if_bnx.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/pci/if_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.97 src/sys/dev/pci/if_bnx.c:1.98 --- src/sys/dev/pci/if_bnx.c:1.97 Tue Jul 14 10:26:34 2020 +++ src/sys/dev/pci/if_bnx.c Tue Jul 14 12:15:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.97 2020/07/14 10:26:34 jdolecek Exp $ */ +/* $NetBSD: if_bnx.c,v 1.98 2020/07/14 12:15:16 jdolecek Exp $ */ /* $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.97 2020/07/14 10:26:34 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.98 2020/07/14 12:15:16 jdolecek Exp $"); /* * The following controllers are supported by this driver: @@ -4170,9 +4170,6 @@ bnx_init_tx_chain(struct bnx_softc *sc) DBPRINT(sc, BNX_VERBOSE_RESET, "Entering %s()\n", __func__); - /* Force an allocation of some dmamaps for tx up front */ - bnx_alloc_pkts(NULL, sc); - /* Set the initial TX producer/consumer indices. */ sc->tx_prod = 0; sc->tx_cons = 0;
CVS commit: src/sys/dev
Module Name:src Committed By: jdolecek Date: Tue Jul 14 12:04:46 UTC 2020 Modified Files: src/sys/dev/ic: ciss.c cissvar.h src/sys/dev/pci: ciss_pci.c Log Message: remove CISS_NO_INTERRUPT_HACK, discussed with joerg@ and spz@ To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/dev/ic/ciss.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/cissvar.h cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/ciss_pci.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/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.48 src/sys/dev/ic/ciss.c:1.49 --- src/sys/dev/ic/ciss.c:1.48 Tue Jul 14 11:44:52 2020 +++ src/sys/dev/ic/ciss.c Tue Jul 14 12:04:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.48 2020/07/14 11:44:52 jdolecek Exp $ */ +/* $NetBSD: ciss.c,v 1.49 2020/07/14 12:04:46 jdolecek Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.48 2020/07/14 11:44:52 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.49 2020/07/14 12:04:46 jdolecek Exp $"); #include "bio.h" @@ -74,11 +74,6 @@ static int ciss_scsi_ioctl(struct scsipi void *addr, int flag, struct proc *p); static void cissminphys(struct buf *bp); -#if 0 -static void ciss_scsi_raw_cmd(struct scsipi_channel *chan, - scsipi_adapter_req_t req, void *arg); -#endif - static int ciss_sync(struct ciss_softc *sc); static void ciss_heartbeat(void *v); static void ciss_shutdown(void *v); @@ -753,11 +748,9 @@ ciss_cmd(struct ciss_softc *sc, struct c bus_dmamap_sync(sc->sc_dmat, sc->cmdmap, 0, sc->cmdmap->dm_mapsize, BUS_DMASYNC_PREWRITE); -#ifndef CISS_NO_INTERRUPT_HACK if ((wait & (XS_CTL_POLL|XS_CTL_NOSLEEP)) == (XS_CTL_POLL|XS_CTL_NOSLEEP)) bus_space_write_4(sc->sc_iot, sc->sc_ioh, CISS_IMR, bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_IMR) | sc->iem); -#endif if (!pollsleep) ccb->ccb_state = CISS_CCB_ONQ; @@ -810,11 +803,9 @@ ciss_cmd(struct ciss_softc *sc, struct c ccb->ccb_err.cmd_stat, ccb->ccb_err.scsi_stat)); } -#ifndef CISS_NO_INTERRUPT_HACK if ((wait & (XS_CTL_POLL|XS_CTL_NOSLEEP)) == (XS_CTL_POLL|XS_CTL_NOSLEEP)) bus_space_write_4(sc->sc_iot, sc->sc_ioh, CISS_IMR, bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_IMR) & ~sc->iem); -#endif return (error); } Index: src/sys/dev/ic/cissvar.h diff -u src/sys/dev/ic/cissvar.h:1.9 src/sys/dev/ic/cissvar.h:1.10 --- src/sys/dev/ic/cissvar.h:1.9 Tue Jul 14 10:37:30 2020 +++ src/sys/dev/ic/cissvar.h Tue Jul 14 12:04:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cissvar.h,v 1.9 2020/07/14 10:37:30 jdolecek Exp $ */ +/* $NetBSD: cissvar.h,v 1.10 2020/07/14 12:04:46 jdolecek Exp $ */ /* $OpenBSD: cissvar.h,v 1.15 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -45,9 +45,6 @@ struct ciss_softc { void *sc_sh; /* shutdown hook */ struct proc *sc_thread; int sc_flush; -#ifdef CISS_NO_INTERRUPT_HACK - struct callout sc_interrupt_hack; -#endif struct scsipi_channel sc_channel; struct scsipi_channel *sc_channel_raw; Index: src/sys/dev/pci/ciss_pci.c diff -u src/sys/dev/pci/ciss_pci.c:1.18 src/sys/dev/pci/ciss_pci.c:1.19 --- src/sys/dev/pci/ciss_pci.c:1.18 Tue Jul 14 10:37:30 2020 +++ src/sys/dev/pci/ciss_pci.c Tue Jul 14 12:04:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss_pci.c,v 1.18 2020/07/14 10:37:30 jdolecek Exp $ */ +/* $NetBSD: ciss_pci.c,v 1.19 2020/07/14 12:04:46 jdolecek Exp $ */ /* $OpenBSD: ciss_pci.c,v 1.9 2005/12/13 15:56:01 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.18 2020/07/14 10:37:30 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.19 2020/07/14 12:04:46 jdolecek Exp $"); #include #include @@ -243,20 +243,6 @@ ciss_pci_match(device_t parent, cfdata_t return 0; } -#ifdef CISS_NO_INTERRUPT_HACK -static void -ciss_intr_wrapper(void *sc_) -{ - struct ciss_softc *sc = sc_; - int s; - - s = splbio(); - ciss_intr(sc); - splx(s); - callout_schedule(>sc_interrupt_hack, 1); -} -#endif - void ciss_pci_attach(device_t parent, device_t self, void *aux) { @@ -271,10 +257,6 @@ ciss_pci_attach(device_t parent, device_ char intrbuf[PCI_INTRSTR_LEN]; int (*intr_handler)(void *); -#ifdef CISS_NO_INTERRUPT_HACK - callout_init(>sc_interrupt_hack, 0); - callout_setfunc(>sc_interrupt_hack, ciss_intr_wrapper, sc); -#endif sc->sc_dev = self; aprint_naive("\n"); @@ -339,11 +321,9 @@ ciss_pci_attach(device_t parent, device_ (u_int32_t *)>cfg, sizeof(sc->cfg) / 4); /* disable interrupts until ready */ -#ifndef CISS_NO_INTERRUPT_HACK bus_space_write_4(sc->sc_iot, sc->sc_ioh, CISS_IMR, bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_IMR) | sc->iem | CISS_INTR_OPQ | CISS_INTR_MSI); -#endif int counts[PCI_INTR_TYPE_SIZE] = { [PCI_INTR_TYPE_INTX] = 1, @@ -409,11 +389,7 @@ ciss_pci_attach(device_t parent,
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Tue Jul 14 11:44:53 UTC 2020 Modified Files: src/sys/dev/ic: ciss.c cissreg.h Log Message: remove ccb_sc to save memory, no need to store pointer to sc in ccb To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/dev/ic/ciss.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/cissreg.h 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/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.47 src/sys/dev/ic/ciss.c:1.48 --- src/sys/dev/ic/ciss.c:1.47 Tue Jul 14 11:39:02 2020 +++ src/sys/dev/ic/ciss.c Tue Jul 14 11:44:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.47 2020/07/14 11:39:02 jdolecek Exp $ */ +/* $NetBSD: ciss.c,v 1.48 2020/07/14 11:44:52 jdolecek Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.47 2020/07/14 11:39:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.48 2020/07/14 11:44:52 jdolecek Exp $"); #include "bio.h" @@ -83,11 +83,11 @@ static int ciss_sync(struct ciss_softc * static void ciss_heartbeat(void *v); static void ciss_shutdown(void *v); -static struct ciss_ccb *ciss_get_ccb(struct ciss_softc *sc); -static void ciss_put_ccb(struct ciss_ccb *ccb); -static int ciss_cmd(struct ciss_ccb *ccb, int flags, int wait); -static int ciss_done(struct ciss_ccb *ccb); -static int ciss_error(struct ciss_ccb *ccb); +static struct ciss_ccb *ciss_get_ccb(struct ciss_softc *); +static void ciss_put_ccb(struct ciss_softc *, struct ciss_ccb *); +static int ciss_cmd(struct ciss_softc *, struct ciss_ccb *, int, int); +static int ciss_done(struct ciss_softc *, struct ciss_ccb *); +static int ciss_error(struct ciss_softc *, struct ciss_ccb *); struct ciss_ld *ciss_pdscan(struct ciss_softc *sc, int ld); static int ciss_inq(struct ciss_softc *sc, struct ciss_inquiry *inq); int ciss_ldid(struct ciss_softc *, int, struct ciss_ldid *); @@ -118,10 +118,8 @@ ciss_get_ccb(struct ciss_softc *sc) } static void -ciss_put_ccb(struct ciss_ccb *ccb) +ciss_put_ccb(struct ciss_softc *sc, struct ciss_ccb *ccb) { - struct ciss_softc *sc = ccb->ccb_sc; - ccb->ccb_state = CISS_CCB_FREE; mutex_enter(>sc_mutex); STAILQ_INSERT_HEAD(>sc_free_ccb, ccb, ccb_link); @@ -354,7 +352,6 @@ ciss_attach(struct ciss_softc *sc) cmd = >ccb_cmd; pa = sc->cmdseg[0].ds_addr + i * sc->ccblen; - ccb->ccb_sc = sc; ccb->ccb_cmdpa = pa + offsetof(struct ciss_ccb, ccb_cmd); ccb->ccb_state = CISS_CCB_FREE; @@ -631,7 +628,7 @@ ciss_poll(struct ciss_softc *sc, struct STAILQ_REMOVE_HEAD(, ccb_link); KASSERT(ccb1->ccb_state == CISS_CCB_ONQ); - ciss_done(ccb1); + ciss_done(sc, ccb1); if (ccb1 == ccb) { KASSERT(STAILQ_EMPTY()); return 0; @@ -662,7 +659,7 @@ ciss_wait(struct ciss_softc *sc, struct } mutex_exit(>sc_mutex); if (ccb->ccb_state == CISS_CCB_ONQ) { - ciss_done(ccb); + ciss_done(sc, ccb); return 0; } tohz = etick - getticks(); @@ -679,9 +676,8 @@ ciss_wait(struct ciss_softc *sc, struct * instead of busy loop waiting */ static int -ciss_cmd(struct ciss_ccb *ccb, int flags, int wait) +ciss_cmd(struct ciss_softc *sc, struct ciss_ccb *ccb, int flags, int wait) { - struct ciss_softc *sc = ccb->ccb_sc; struct ciss_cmd *cmd = >ccb_cmd; bus_dmamap_t dmap = ccb->ccb_dmamap; u_int64_t addr; @@ -704,7 +700,7 @@ ciss_cmd(struct ciss_ccb *ccb, int flags printf("more than %d dma segs\n", sc->maxsg); else printf("error %d loading dma map\n", error); - ciss_put_ccb(ccb); + ciss_put_ccb(sc, ccb); return (error); } cmd->sgin = dmap->dm_nsegs; @@ -807,7 +803,7 @@ ciss_cmd(struct ciss_ccb *ccb, int flags if (ccb->ccb_state != CISS_CCB_FREE) { KASSERT(error); ccb->ccb_err.cmd_stat = CISS_ERR_TMO; - error = ciss_done(ccb); + error = ciss_done(sc, ccb); } CISS_DPRINTF(CISS_D_CMD, ("done %d:%d", @@ -824,9 +820,8 @@ ciss_cmd(struct ciss_ccb *ccb, int flags } static int -ciss_done(struct ciss_ccb *ccb) +ciss_done(struct ciss_softc *sc, struct ciss_ccb *ccb) { - struct ciss_softc *sc = ccb->ccb_sc; struct scsipi_xfer *xs = ccb->ccb_xs; struct ciss_cmd *cmd; int error = 0; @@ -842,7 +837,7 @@ ciss_done(struct ciss_ccb *ccb) ccb->ccb_state = CISS_CCB_READY; if (ccb->ccb_cmd.id & CISS_CMD_ERR) - error = ciss_error(ccb); + error = ciss_error(sc, ccb); cmd = >ccb_cmd; if (ccb->ccb_data) { @@ -854,7 +849,7 @@ ciss_done(struct ciss_ccb *ccb) ccb->ccb_data = NULL; } - ciss_put_ccb(ccb); + ciss_put_ccb(sc, ccb); if (xs) { xs->resid = 0; @@ -874,9 +869,8 @@ ciss_done(struct ciss_ccb *ccb) } static int -ciss_error(struct ciss_ccb *ccb) +ciss_error(struct ciss_softc *sc, struct ciss_ccb *ccb) { - struct ciss_softc *sc = ccb->ccb_sc; struct ciss_error *err = >ccb_err; struct scsipi_xfer *xs = ccb->ccb_xs;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Tue Jul 14 11:39:02 UTC 2020 Modified Files: src/sys/dev/ic: ciss.c cissreg.h Log Message: use STAILQ for ccb lists to save some memory, doubly-linked list is not needed To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/dev/ic/ciss.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/cissreg.h 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/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.46 src/sys/dev/ic/ciss.c:1.47 --- src/sys/dev/ic/ciss.c:1.46 Tue Jul 14 10:44:34 2020 +++ src/sys/dev/ic/ciss.c Tue Jul 14 11:39:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.46 2020/07/14 10:44:34 jdolecek Exp $ */ +/* $NetBSD: ciss.c,v 1.47 2020/07/14 11:39:02 jdolecek Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.46 2020/07/14 10:44:34 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.47 2020/07/14 11:39:02 jdolecek Exp $"); #include "bio.h" @@ -109,8 +109,8 @@ ciss_get_ccb(struct ciss_softc *sc) struct ciss_ccb *ccb; mutex_enter(>sc_mutex); - if ((ccb = TAILQ_LAST(>sc_free_ccb, ciss_queue_head))) { - TAILQ_REMOVE(>sc_free_ccb, ccb, ccb_link); + if ((ccb = STAILQ_FIRST(>sc_free_ccb))) { + STAILQ_REMOVE_HEAD(>sc_free_ccb, ccb_link); ccb->ccb_state = CISS_CCB_READY; } mutex_exit(>sc_mutex); @@ -124,7 +124,7 @@ ciss_put_ccb(struct ciss_ccb *ccb) ccb->ccb_state = CISS_CCB_FREE; mutex_enter(>sc_mutex); - TAILQ_INSERT_TAIL(>sc_free_ccb, ccb, ccb_link); + STAILQ_INSERT_HEAD(>sc_free_ccb, ccb, ccb_link); mutex_exit(>sc_mutex); } @@ -346,7 +346,7 @@ ciss_attach(struct ciss_softc *sc) return -1; } - TAILQ_INIT(>sc_free_ccb); + STAILQ_INIT(>sc_free_ccb); maxfer = sc->maxsg * PAGE_SIZE; for (i = 0; total > 0 && i < sc->maxcmd; i++, total -= sc->ccblen) { @@ -371,7 +371,7 @@ ciss_attach(struct ciss_softc *sc) >ccb_dmamap))) break; - TAILQ_INSERT_TAIL(>sc_free_ccb, ccb, ccb_link); + STAILQ_INSERT_TAIL(>sc_free_ccb, ccb, ccb_link); } if (i < sc->maxcmd) { @@ -544,7 +544,7 @@ ciss_enqueue(struct ciss_softc *sc, ciss ccb = (struct ciss_ccb *) ((char *)sc->ccbs + (id >> 2) * sc->ccblen); ccb->ccb_cmd.id = htole32(id); ccb->ccb_cmd.id_hi = htole32(0); - TAILQ_INSERT_TAIL(q, ccb, ccb_link); + STAILQ_INSERT_TAIL(q, ccb, ccb_link); } static void @@ -614,7 +614,7 @@ ciss_poll(struct ciss_softc *sc, struct ciss_queue_head q; struct ciss_ccb *ccb1; - TAILQ_INIT(); + STAILQ_INIT(); ms /= 10; while (ms-- > 0) { @@ -626,14 +626,14 @@ ciss_poll(struct ciss_softc *sc, struct ciss_completed_simple(sc, ); mutex_exit(>sc_mutex); - while (!TAILQ_EMPTY()) { - ccb1 = TAILQ_FIRST(); - TAILQ_REMOVE(, ccb1, ccb_link); + while (!STAILQ_EMPTY()) { + ccb1 = STAILQ_FIRST(); + STAILQ_REMOVE_HEAD(, ccb_link); KASSERT(ccb1->ccb_state == CISS_CCB_ONQ); ciss_done(ccb1); if (ccb1 == ccb) { -KASSERT(TAILQ_EMPTY()); +KASSERT(STAILQ_EMPTY()); return 0; } } @@ -1264,9 +1264,9 @@ ciss_completed_process(struct ciss_softc { struct ciss_ccb *ccb; - while (!TAILQ_EMPTY(q)) { - ccb = TAILQ_FIRST(q); - TAILQ_REMOVE(q, ccb, ccb_link); + while (!STAILQ_EMPTY(q)) { + ccb = STAILQ_FIRST(q); + STAILQ_REMOVE_HEAD(q, ccb_link); if (ccb->ccb_state == CISS_CCB_POLL) { ccb->ccb_state = CISS_CCB_ONQ; @@ -1291,15 +1291,15 @@ ciss_intr_simple_intx(void *v) if (!(bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_ISR) & sc->iem)) return 0; - TAILQ_INIT(); + STAILQ_INIT(); mutex_enter(>sc_mutex); ciss_completed_simple(sc, ); mutex_exit(>sc_mutex); - hit = (!TAILQ_EMPTY()); + hit = (!STAILQ_EMPTY()); ciss_completed_process(sc, ); - KASSERT(TAILQ_EMPTY()); + KASSERT(STAILQ_EMPTY()); CISS_DPRINTF(CISS_D_INTR, ("exit\n")); return hit; @@ -1329,14 +1329,14 @@ ciss_intr_perf_msi(void *v) CISS_DPRINTF(CISS_D_INTR, ("intr ")); - TAILQ_INIT(); + STAILQ_INIT(); mutex_enter(>sc_mutex); ciss_completed_perf(sc, ); mutex_exit(>sc_mutex); ciss_completed_process(sc, ); - KASSERT(TAILQ_EMPTY()); + KASSERT(STAILQ_EMPTY()); CISS_DPRINTF(CISS_D_INTR, ("exit")); return 1; Index: src/sys/dev/ic/cissreg.h diff -u src/sys/dev/ic/cissreg.h:1.6 src/sys/dev/ic/cissreg.h:1.7 --- src/sys/dev/ic/cissreg.h:1.6 Tue Jul 14 10:37:30 2020 +++ src/sys/dev/ic/cissreg.h Tue Jul 14 11:39:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cissreg.h,v 1.6 2020/07/14 10:37:30 jdolecek Exp $ */ +/* $NetBSD: cissreg.h,v 1.7 2020/07/14 11:39:02 jdolecek Exp $ */ /* $OpenBSD: cissreg.h,v 1.11 2010/06/03 01:02:13 dlg Exp $ */ /* @@ -516,7 +516,7 @@ struct ciss_error { } __packed; struct ciss_ccb { - TAILQ_ENTRY(ciss_ccb) ccb_link; + STAILQ_ENTRY(ciss_ccb) ccb_link; struct ciss_softc *ccb_sc; paddr_t ccb_cmdpa; enum { @@ -539,5 +539,5 @@ struct
CVS commit: src/doc
Module Name:src Committed By: jdolecek Date: Tue Jul 14 10:49:21 UTC 2020 Modified Files: src/doc: CHANGES Log Message: note bnx(4) MSI/MSI-X and ciss(4) PERFORMANT+MSI/MSI-X To generate a diff of this commit: cvs rdiff -u -r1.2711 -r1.2712 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2711 src/doc/CHANGES:1.2712 --- src/doc/CHANGES:1.2711 Mon Jul 13 11:26:50 2020 +++ src/doc/CHANGES Tue Jul 14 10:49:21 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2711 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2712 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -246,3 +246,6 @@ Changes from NetBSD 9.0 to NetBSD 10.0: wskbd(4): Added keyboard layouts for Brazilian Portugese, Canadian French, Estonian, Icelandic, and Latin American Spanish to pckbd(4) and ukbd(4). [nia 20200713] + bnx(4): Enable support for MSI/MSI-X [jdolecek 20200714] + ciss(4): Add support for PERFORMANT mode, and enable MSI/MSI-X + for adapters supporting it [jdolecek 20200714]
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Tue Jul 14 10:44:34 UTC 2020 Modified Files: src/sys/dev/ic: ciss.c Log Message: only copy the actual command length in ciss_scsi_cmd(), instead of always copying CISS_MAX_CDB bytes Fixes reading past buffer memory triggered e.g. on kernel dump, reported by KASAN: ASan: Unauthorized Access In ...: Addr ... [16 bytes, read, RedZonePartial] also do not pre-zero the cdb before copying cmd to it, there is no need for it To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/ciss.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/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.45 src/sys/dev/ic/ciss.c:1.46 --- src/sys/dev/ic/ciss.c:1.45 Tue Jul 14 10:38:06 2020 +++ src/sys/dev/ic/ciss.c Tue Jul 14 10:44:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.45 2020/07/14 10:38:06 jdolecek Exp $ */ +/* $NetBSD: ciss.c,v 1.46 2020/07/14 10:44:34 jdolecek Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.45 2020/07/14 10:38:06 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.46 2020/07/14 10:44:34 jdolecek Exp $"); #include "bio.h" @@ -1225,8 +1225,7 @@ ciss_scsi_cmd(struct scsipi_channel *cha else if (xs->xs_control & XS_CTL_DATA_OUT) cmd->flags |= CISS_CDB_OUT; cmd->tmo = htole16(xs->timeout < 1000? 1 : xs->timeout / 1000); - memset(>cdb[0], 0, sizeof(cmd->cdb)); - memcpy(>cdb[0], xs->cmd, CISS_MAX_CDB); + memcpy(>cdb[0], xs->cmd, xs->cmdlen); CISS_DPRINTF(CISS_D_CMD, ("cmd=%02x %02x %02x %02x %02x %02x ", cmd->cdb[0], cmd->cdb[1], cmd->cdb[2], cmd->cdb[3], cmd->cdb[4], cmd->cdb[5]));
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Tue Jul 14 10:38:07 UTC 2020 Modified Files: src/sys/dev/ic: ciss.c Log Message: g/c #if 0'ed ciss_scsi_raw_cmd() To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/ic/ciss.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/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.44 src/sys/dev/ic/ciss.c:1.45 --- src/sys/dev/ic/ciss.c:1.44 Tue Jul 14 10:37:30 2020 +++ src/sys/dev/ic/ciss.c Tue Jul 14 10:38:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.44 2020/07/14 10:37:30 jdolecek Exp $ */ +/* $NetBSD: ciss.c,v 1.45 2020/07/14 10:38:06 jdolecek Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.44 2020/07/14 10:37:30 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.45 2020/07/14 10:38:06 jdolecek Exp $"); #include "bio.h" @@ -1178,83 +1178,6 @@ ciss_pdscan(struct ciss_softc *sc, int l return ldp; } -#if 0 -static void -ciss_scsi_raw_cmd(struct scsipi_channel *chan, scsipi_adapter_req_t req, - void *arg)/* TODO */ -{ - struct scsipi_xfer *xs = (struct scsipi_xfer *) arg; - struct ciss_rawsoftc *rsc = device_private( - chan->chan_adapter->adapt_dev); - struct ciss_softc *sc = rsc->sc_softc; - struct ciss_ccb *ccb; - struct ciss_cmd *cmd; - int error; - - CISS_DPRINTF(CISS_D_CMD, ("ciss_scsi_raw_cmd ")); - - switch (req) - { - case ADAPTER_REQ_RUN_XFER: - if (xs->cmdlen > CISS_MAX_CDB) { - CISS_DPRINTF(CISS_D_CMD, ("CDB too big %p ", xs)); - memset(>sense, 0, sizeof(xs->sense)); - printf("ciss driver stuffup in %s:%d: %s()\n", - __FILE__, __LINE__, __func__); - xs->error = XS_DRIVER_STUFFUP; - scsipi_done(xs); - break; - } - - error = 0; - xs->error = XS_NOERROR; - - /* TODO check this target has not yet employed w/ any volume */ - - ccb = ciss_get_ccb(sc); - cmd = >ccb_cmd; - ccb->ccb_len = xs->datalen; - ccb->ccb_data = xs->data; - ccb->ccb_xs = xs; - - cmd->cdblen = xs->cmdlen; - cmd->flags = CISS_CDB_CMD | CISS_CDB_SIMPL; - if (xs->xs_control & XS_CTL_DATA_IN) - cmd->flags |= CISS_CDB_IN; - else if (xs->xs_control & XS_CTL_DATA_OUT) - cmd->flags |= CISS_CDB_OUT; - cmd->tmo = xs->timeout < 1000? 1 : xs->timeout / 1000; - memset(>cdb[0], 0, sizeof(cmd->cdb)); - memcpy(>cdb[0], xs->cmd, CISS_MAX_CDB); - - if (ciss_cmd(ccb, BUS_DMA_WAITOK, - xs->xs_control & (XS_CTL_POLL|XS_CTL_NOSLEEP))) { - printf("ciss driver stuffup in %s:%d: %s()\n", - __FILE__, __LINE__, __func__); - xs->error = XS_DRIVER_STUFFUP; - scsipi_done(xs); - break; - } - - break; - - case ADAPTER_REQ_GROW_RESOURCES: - /* - * Not supported. - */ - break; - - case ADAPTER_REQ_SET_XFER_MODE: - /* - * We can't change the transfer mode, but at least let - * scsipi know what the adapter has negociated. - */ - /* Get xfer mode and return it */ - break; - } -} -#endif - static void ciss_scsi_cmd(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg)
CVS commit: src/sys/dev
Module Name:src Committed By: jdolecek Date: Tue Jul 14 10:37:30 UTC 2020 Modified Files: src/sys/dev/ic: ciss.c cissreg.h cissvar.h src/sys/dev/pci: ciss_pci.c Log Message: add support for PERFORMANT mode, and allow MSI/MSI-X (only) for adapters which support it code adapted from FreeBSD, but with fix for setting the performant bit and pull count on command submittion as seen in hpsa Linux driver tested with INTx and MSI-X on HP Smart Array 11 thanks to Andreas Gustafsson for initial testing, and providing access to test machine To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ic/ciss.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/cissreg.h cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/cissvar.h cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ciss_pci.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/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.43 src/sys/dev/ic/ciss.c:1.44 --- src/sys/dev/ic/ciss.c:1.43 Fri Jul 10 14:23:56 2020 +++ src/sys/dev/ic/ciss.c Tue Jul 14 10:37:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.43 2020/07/10 14:23:56 jdolecek Exp $ */ +/* $NetBSD: ciss.c,v 1.44 2020/07/14 10:37:30 jdolecek Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.43 2020/07/10 14:23:56 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.44 2020/07/14 10:37:30 jdolecek Exp $"); #include "bio.h" @@ -128,6 +128,98 @@ ciss_put_ccb(struct ciss_ccb *ccb) mutex_exit(>sc_mutex); } +static int +ciss_init_perf(struct ciss_softc *sc) +{ + struct ciss_perf_config *pc = >perfcfg; + int error, total, rseg; + + if (sc->cfg.max_perfomant_mode_cmds) + sc->maxcmd = sc->cfg.max_perfomant_mode_cmds; + + bus_space_read_region_4(sc->sc_iot, sc->cfg_ioh, + sc->cfgoff + sc->cfg.troff, + (u_int32_t *)pc, sizeof(*pc) / 4); + + total = sizeof(uint64_t) * sc->maxcmd; + + if ((error = bus_dmamem_alloc(sc->sc_dmat, total, PAGE_SIZE, 0, + sc->replyseg, 1, , BUS_DMA_WAITOK))) { + aprint_error(": cannot allocate perf area (%d)\n", error); + return -1; + } + + if ((error = bus_dmamem_map(sc->sc_dmat, sc->replyseg, rseg, total, + (void **)>perf_reply, BUS_DMA_WAITOK))) { + aprint_error(": cannot map perf area (%d)\n", error); + bus_dmamem_free(sc->sc_dmat, sc->replyseg, 1); + return -1; + } + + if ((error = bus_dmamap_create(sc->sc_dmat, total, 1, + total, 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW, >replymap))) { + aprint_error(": cannot create perf dmamap (%d)\n", error); + bus_dmamem_unmap(sc->sc_dmat, sc->perf_reply, total); + sc->perf_reply = NULL; + bus_dmamem_free(sc->sc_dmat, sc->replyseg, 1); + return -1; + } + + if ((error = bus_dmamap_load(sc->sc_dmat, sc->replymap, sc->perf_reply, + total, NULL, BUS_DMA_WAITOK))) { + aprint_error(": cannot load perf dmamap (%d)\n", error); + bus_dmamap_destroy(sc->sc_dmat, sc->replymap); + bus_dmamem_unmap(sc->sc_dmat, sc->perf_reply, total); + sc->perf_reply = NULL; + bus_dmamem_free(sc->sc_dmat, sc->replyseg, 1); + return -1; + } + + memset(sc->perf_reply, 0, total); + + sc->perf_cycle = 0x1; + sc->perf_rqidx = 0; + + /* + * Preload the fetch table with common command sizes. This allows the + * hardware to not waste bus cycles for typical i/o commands, but also + * not tax the driver to be too exact in choosing sizes. The table + * is optimized for page-aligned i/o's, but since most i/o comes + * from the various pagers, it's a reasonable assumption to make. + */ +#define CISS_FETCH_COUNT(x) \ +(sizeof(struct ciss_cmd) + sizeof(struct ciss_sg_entry) * (x - 1) + 15) / 16 + + pc->fetch_count[CISS_SG_FETCH_NONE] = CISS_FETCH_COUNT(0); + pc->fetch_count[CISS_SG_FETCH_1] = CISS_FETCH_COUNT(1); + pc->fetch_count[CISS_SG_FETCH_2] = CISS_FETCH_COUNT(2); + pc->fetch_count[CISS_SG_FETCH_4] = CISS_FETCH_COUNT(4); + pc->fetch_count[CISS_SG_FETCH_8] = CISS_FETCH_COUNT(8); + pc->fetch_count[CISS_SG_FETCH_16] = CISS_FETCH_COUNT(16); + pc->fetch_count[CISS_SG_FETCH_32] = CISS_FETCH_COUNT(32); + pc->fetch_count[CISS_SG_FETCH_MAX] = (sc->ccblen + 15) / 16; + + pc->rq_size = sc->maxcmd; + pc->rq_count = 1; /* Hardcode for a single queue */ + pc->rq_bank_hi = 0; + pc->rq_bank_lo = 0; + pc->rq[0].rq_addr_hi = 0x0; + pc->rq[0].rq_addr_lo = sc->replymap->dm_segs[0].ds_addr; + + /* + * Write back the changed configuration. Tt will be picked up + * by controller together with general configuration later on. + */ + bus_space_write_region_4(sc->sc_iot, sc->cfg_ioh, + sc->cfgoff + sc->cfg.troff, + (u_int32_t *)pc, sizeof(*pc) / 4); + bus_space_barrier(sc->sc_iot, sc->cfg_ioh, + sc->cfgoff + sc->cfg.troff, sizeof(*pc), + BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE); + + return 0; +} + int ciss_attach(struct ciss_softc *sc) { @@ -138,27 +230,41 @@ ciss_attach(struct ciss_softc *sc) int error,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jul 14 10:26:34 UTC 2020 Modified Files: src/sys/dev/pci: if_bnx.c Log Message: only destroy the TX pkgs and dmamaps in bnx_dma_free() called on detach, don't do it anymore in bnx_free_tx_chain(), called from bnx_init() avoid occassional panic triggered by the free code having to allocate memory from interrupt context when bnx_init() is called from bnx_watchdog() To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/if_bnx.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/pci/if_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.96 src/sys/dev/pci/if_bnx.c:1.97 --- src/sys/dev/pci/if_bnx.c:1.96 Sun Jul 12 19:05:32 2020 +++ src/sys/dev/pci/if_bnx.c Tue Jul 14 10:26:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.96 2020/07/12 19:05:32 jdolecek Exp $ */ +/* $NetBSD: if_bnx.c,v 1.97 2020/07/14 10:26:34 jdolecek Exp $ */ /* $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.96 2020/07/12 19:05:32 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.97 2020/07/14 10:26:34 jdolecek Exp $"); /* * The following controllers are supported by this driver: @@ -2375,7 +2375,14 @@ bnx_dma_free(struct bnx_softc *sc) } /* Destroy the TX dmamaps. */ - /* This isn't necessary since we dont allocate them up front */ + struct bnx_pkt *pkt; + while ((pkt = TAILQ_FIRST(>tx_free_pkts)) != NULL) { + TAILQ_REMOVE(>tx_free_pkts, pkt, pkt_entry); + sc->tx_pkt_count--; + + bus_dmamap_destroy(sc->bnx_dmatag, pkt->pkt_dmamap); + pool_put(bnx_tx_pool, pkt); + } /* Free, unmap and destroy all RX buffer descriptor chain pages. */ for (i = 0; i < RX_PAGES; i++ ) { @@ -4245,22 +4252,8 @@ bnx_free_tx_chain(struct bnx_softc *sc) mutex_enter(>tx_pkt_mtx); TAILQ_INSERT_TAIL(>tx_free_pkts, pkt, pkt_entry); } - - /* Destroy all the dmamaps we allocated for TX */ - while ((pkt = TAILQ_FIRST(>tx_free_pkts)) != NULL) { - TAILQ_REMOVE(>tx_free_pkts, pkt, pkt_entry); - sc->tx_pkt_count--; - mutex_exit(>tx_pkt_mtx); - - bus_dmamap_destroy(sc->bnx_dmatag, pkt->pkt_dmamap); - pool_put(bnx_tx_pool, pkt); - - mutex_enter(>tx_pkt_mtx); - } mutex_exit(>tx_pkt_mtx); - - /* Clear each TX chain page. */ for (i = 0; i < TX_PAGES; i++) { memset(sc->tx_bd_chain[i], 0, BNX_TX_CHAIN_PAGE_SZ);
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: martin Date: Tue Jul 14 08:58:03 UTC 2020 Modified Files: src/sys/arch/macppc/dev: cuda.c pmu.c Log Message: Adapt to new proplib API To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/macppc/dev/cuda.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/macppc/dev/pmu.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/arch/macppc/dev/cuda.c diff -u src/sys/arch/macppc/dev/cuda.c:1.25 src/sys/arch/macppc/dev/cuda.c:1.26 --- src/sys/arch/macppc/dev/cuda.c:1.25 Tue Jul 14 08:52:00 2020 +++ src/sys/arch/macppc/dev/cuda.c Tue Jul 14 08:58:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cuda.c,v 1.25 2020/07/14 08:52:00 martin Exp $ */ +/* $NetBSD: cuda.c,v 1.26 2020/07/14 08:58:03 martin Exp $ */ /*- * Copyright (c) 2006 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.25 2020/07/14 08:52:00 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.26 2020/07/14 08:58:03 martin Exp $"); #include #include @@ -259,7 +259,7 @@ cuda_attach(device_t parent, device_t se node = OF_finddevice("/valkyrie"); if (node != -1) { dev = prop_dictionary_create(); - prop_dictionary_set_cstring(dev, "name", "videopll"); + prop_dictionary_set_string(dev, "name", "videopll"); prop_dictionary_set_uint32(dev, "addr", 0x50); prop_array_add(cfg, dev); prop_object_release(dev); Index: src/sys/arch/macppc/dev/pmu.c diff -u src/sys/arch/macppc/dev/pmu.c:1.33 src/sys/arch/macppc/dev/pmu.c:1.34 --- src/sys/arch/macppc/dev/pmu.c:1.33 Sun Dec 22 23:23:30 2019 +++ src/sys/arch/macppc/dev/pmu.c Tue Jul 14 08:58:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmu.c,v 1.33 2019/12/22 23:23:30 thorpej Exp $ */ +/* $NetBSD: pmu.c,v 1.34 2020/07/14 08:58:03 martin Exp $ */ /*- * Copyright (c) 2006 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.33 2019/12/22 23:23:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.34 2020/07/14 08:58:03 martin Exp $"); #include #include @@ -365,8 +365,8 @@ pmu_attach(device_t parent, device_t sel addr = (addr & 0xff) >> 1; DPRINTF("-> %s@%x\n", name, addr); dev = prop_dictionary_create(); -prop_dictionary_set_cstring(dev, "name", name); -data = prop_data_create_data(compat, strlen(compat)+1); +prop_dictionary_set_string(dev, "name", name); +data = prop_data_create_copy(compat, strlen(compat)+1); prop_dictionary_set(dev, "compatible", data); prop_object_release(data); prop_dictionary_set_uint32(dev, "addr", addr);
CVS commit: src/sys/arch/macppc/macppc
Module Name:src Committed By: martin Date: Tue Jul 14 08:55:07 UTC 2020 Modified Files: src/sys/arch/macppc/macppc: machdep.c Log Message: Adapt to new proplib API To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/sys/arch/macppc/macppc/machdep.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/arch/macppc/macppc/machdep.c diff -u src/sys/arch/macppc/macppc/machdep.c:1.170 src/sys/arch/macppc/macppc/machdep.c:1.171 --- src/sys/arch/macppc/macppc/machdep.c:1.170 Tue Jul 7 02:33:54 2020 +++ src/sys/arch/macppc/macppc/machdep.c Tue Jul 14 08:55:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.170 2020/07/07 02:33:54 rin Exp $ */ +/* $NetBSD: machdep.c,v 1.171 2020/07/14 08:55:07 martin Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.170 2020/07/07 02:33:54 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171 2020/07/14 08:55:07 martin Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -417,14 +417,14 @@ add_model_specifics(prop_dictionary_t di if (of_compatible(node, clamshell) != -1) { prop_data_t edid; - edid = prop_data_create_data(edid_clamshell, sizeof(edid_clamshell)); + edid = prop_data_create_nocopy(edid_clamshell, sizeof(edid_clamshell)); prop_dictionary_set(dict, "EDID", edid); prop_object_release(edid); } if (of_compatible(node, pismo) != -1) { prop_data_t edid; - edid = prop_data_create_data(edid_pismo, sizeof(edid_pismo)); + edid = prop_data_create_nocopy(edid_pismo, sizeof(edid_pismo)); prop_dictionary_set(dict, "EDID", edid); prop_object_release(edid); }
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: martin Date: Tue Jul 14 08:52:00 UTC 2020 Modified Files: src/sys/arch/macppc/dev: cuda.c Log Message: Adapt to new proplib API To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/macppc/dev/cuda.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/arch/macppc/dev/cuda.c diff -u src/sys/arch/macppc/dev/cuda.c:1.24 src/sys/arch/macppc/dev/cuda.c:1.25 --- src/sys/arch/macppc/dev/cuda.c:1.24 Sun Dec 22 23:23:30 2019 +++ src/sys/arch/macppc/dev/cuda.c Tue Jul 14 08:52:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cuda.c,v 1.24 2019/12/22 23:23:30 thorpej Exp $ */ +/* $NetBSD: cuda.c,v 1.25 2020/07/14 08:52:00 martin Exp $ */ /*- * Copyright (c) 2006 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.24 2019/12/22 23:23:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.25 2020/07/14 08:52:00 martin Exp $"); #include #include @@ -268,7 +268,7 @@ cuda_attach(device_t parent, device_t se node = OF_finddevice("/perch"); if (node != -1) { dev = prop_dictionary_create(); - prop_dictionary_set_cstring(dev, "name", "sgsmix"); + prop_dictionary_set_string(dev, "name", "sgsmix"); prop_dictionary_set_uint32(dev, "addr", 0x8a); prop_array_add(cfg, dev); prop_object_release(dev);