CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Feb 21 07:49:47 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some ServerEngines (Emulex) products from OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.1309 -r1.1310 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.1309 src/sys/dev/pci/pcidevs:1.1310 --- src/sys/dev/pci/pcidevs:1.1309 Sat Feb 17 00:45:14 2018 +++ src/sys/dev/pci/pcidevs Wed Feb 21 07:49:47 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1309 2018/02/17 00:45:14 sevan Exp $ +$NetBSD: pcidevs,v 1.1310 2018/02/21 07:49:47 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -632,6 +632,7 @@ vendor RENESAS 0x1912 Renesas Technolog vendor FREESCALE 0x1957 Freescale Semiconductor vendor ATTANSIC 0x1969 Attansic Technologies vendor JMICRON 0x197b JMicron Technology +vendor SERVERENGINES 0x19a2 ServerEngines vendor HUAWEI 0x19e5 Huaewi Technology vendor ASPEED 0x1a03 ASPEED Technology vendor AWT 0x1a3b AWT @@ -6242,6 +6243,13 @@ product SANDBURST FE1000 0x0200 FE1000 /* SEGA Enterprises products */ product SEGA BROADBAND 0x1234 Broadband Adapter +/* ServerEngines (Emulex) products */ +product SERVERENGINES BE2 0x0211 BladeEngine2 10GbE +product SERVERENGINES BE3 0x0221 BladeEngine3 10GbE +product SERVERENGINES OCBE2 0x0700 BladeEngine2 10GbE +product SERVERENGINES OCBE3 0x0710 BladeEngine3 10GbE +product SERVERENGINES IRMC 0x0800 iRMC + /* ServerWorks products */ product SERVERWORKS CNB20_LE_AGP 0x0005 CNB20-LE PCI/AGP Bridge product SERVERWORKS CNB30_LE_PCI 0x0006 CNB30-LE PCI Bridge
CVS commit: src/lib/libc/net
Module Name:src Committed By: kamil Date: Wed Feb 21 03:13:50 UTC 2018 Modified Files: src/lib/libc/net: getnetent.3 Log Message: Improve the getnetent(3) man-page Document return type of setnetent(3) and endnetent(3). Both "void". Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/net/getnetent.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/getnetent.3 diff -u src/lib/libc/net/getnetent.3:1.13 src/lib/libc/net/getnetent.3:1.14 --- src/lib/libc/net/getnetent.3:1.13 Sat May 8 18:52:15 2004 +++ src/lib/libc/net/getnetent.3 Wed Feb 21 03:13:50 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: getnetent.3,v 1.13 2004/05/08 18:52:15 kleink Exp $ +.\" $NetBSD: getnetent.3,v 1.14 2018/02/21 03:13:50 kamil Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)getnetent.3 8.1 (Berkeley) 6/4/93 .\" -.Dd May 8, 2004 +.Dd February 21, 2018 .Dt GETNETENT 3 .Os .Sh NAME @@ -49,7 +49,9 @@ .Fn getnetbyname "const char *name" .Ft struct netent * .Fn getnetbyaddr "uint32_t net" "int type" +.Ft void .Fn setnetent "int stayopen" +.Ft void .Fn endnetent .Sh DESCRIPTION The
CVS commit: src/sys/sys
Module Name:src Committed By: kamil Date: Tue Feb 20 18:20:05 UTC 2018 Modified Files: src/sys/sys: fcntl.h Log Message: Enable O_NOFOLLOW in the POSIX namespace This open(2) flag first appeared in FreeBSD and was standarized by POSIX in the 2008 standard. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/sys/fcntl.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/sys/fcntl.h diff -u src/sys/sys/fcntl.h:1.49 src/sys/sys/fcntl.h:1.50 --- src/sys/sys/fcntl.h:1.49 Thu Nov 9 20:30:01 2017 +++ src/sys/sys/fcntl.h Tue Feb 20 18:20:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fcntl.h,v 1.49 2017/11/09 20:30:01 christos Exp $ */ +/* $NetBSD: fcntl.h,v 1.50 2018/02/20 18:20:05 kamil Exp $ */ /*- * Copyright (c) 1983, 1990, 1993 @@ -90,7 +90,7 @@ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE) #define O_SYNC 0x0080 /* synchronous writes */ #endif -#if defined(_NETBSD_SOURCE) +#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) #define O_NOFOLLOW 0x0100 /* don't follow symlinks on the last */ /* path component */ #endif
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: uwe Date: Tue Feb 20 17:23:40 UTC 2018 Modified Files: src/lib/libc/stdio: setbuf.3 Log Message: Markup "stdin". To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/lib/libc/stdio/setbuf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/setbuf.3 diff -u src/lib/libc/stdio/setbuf.3:1.18 src/lib/libc/stdio/setbuf.3:1.19 --- src/lib/libc/stdio/setbuf.3:1.18 Tue Feb 20 17:21:11 2018 +++ src/lib/libc/stdio/setbuf.3 Tue Feb 20 17:23:39 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: setbuf.3,v 1.18 2018/02/20 17:21:11 uwe Exp $ +.\" $NetBSD: setbuf.3,v 1.19 2018/02/20 17:23:39 uwe Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -62,7 +62,8 @@ destination file or terminal as soon as when it is block buffered many characters are saved up and written as a block; when it is line buffered characters are saved up until a newline is output or input is read from any stream attached to a terminal device -(typically stdin). +(typically +.Va stdin ) . .Pp The default buffer settings can be overwritten per descriptor .Ev ( STDBUF Ns Ar n )
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: uwe Date: Tue Feb 20 17:21:11 UTC 2018 Modified Files: src/lib/libc/stdio: setbuf.3 Log Message: Make the list of STDBUF values and the list of mode values congruent in formatting and spelling. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/stdio/setbuf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/setbuf.3 diff -u src/lib/libc/stdio/setbuf.3:1.17 src/lib/libc/stdio/setbuf.3:1.18 --- src/lib/libc/stdio/setbuf.3:1.17 Tue Feb 20 17:16:51 2018 +++ src/lib/libc/stdio/setbuf.3 Tue Feb 20 17:21:11 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: setbuf.3,v 1.17 2018/02/20 17:16:51 uwe Exp $ +.\" $NetBSD: setbuf.3,v 1.18 2018/02/20 17:21:11 uwe Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -75,13 +75,13 @@ The environment variable value is a lett value indicating the size of the buffer. Valid sizes range from 0B to 1MB. Valid letters are: -.Bl -tag -width X +.Bl -tag -offset indent -width X .It Li U -Unbuffered. +unbuffered .It Li L -Line-buffered. +line buffered .It Li F -Fully-buffered. +fully buffered .El .Pp The function
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: uwe Date: Tue Feb 20 17:16:51 UTC 2018 Modified Files: src/lib/libc/stdio: setbuf.3 Log Message: Use semantic markup. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/stdio/setbuf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/setbuf.3 diff -u src/lib/libc/stdio/setbuf.3:1.16 src/lib/libc/stdio/setbuf.3:1.17 --- src/lib/libc/stdio/setbuf.3:1.16 Tue Feb 20 09:36:26 2018 +++ src/lib/libc/stdio/setbuf.3 Tue Feb 20 17:16:51 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: setbuf.3,v 1.16 2018/02/20 09:36:26 wiz Exp $ +.\" $NetBSD: setbuf.3,v 1.17 2018/02/20 17:16:51 uwe Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -65,12 +65,12 @@ output or input is read from any stream (typically stdin). .Pp The default buffer settings can be overwritten per descriptor -.Dv ( STDBUFn ) +.Ev ( STDBUF Ns Ar n ) where -.Dv n +.Ar n is the numeric value of the file descriptor represented by the stream, or for all descriptors -.Dv ( STDBUF ) . +.Ev ( STDBUF ) . The environment variable value is a letter followed by an optional numeric value indicating the size of the buffer. Valid sizes range from 0B to 1MB. @@ -97,10 +97,10 @@ is called, and an optimally-sized buffer is obtained. If a stream refers to a terminal (as -.Em stdout +.Va stdout normally does) it is line buffered. The standard error stream -.Em stderr +.Va stderr is initially unbuffered. .Pp The
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Tue Feb 20 15:56:43 UTC 2018 Modified Files: src/share/man/man4: ugen.4 Log Message: Add missing end quote. Avoid some punctuation markup. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/ugen.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/ugen.4 diff -u src/share/man/man4/ugen.4:1.33 src/share/man/man4/ugen.4:1.34 --- src/share/man/man4/ugen.4:1.33 Tue Feb 20 15:50:02 2018 +++ src/share/man/man4/ugen.4 Tue Feb 20 15:56:43 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ugen.4,v 1.33 2018/02/20 15:50:02 ws Exp $ +.\" $NetBSD: ugen.4,v 1.34 2018/02/20 15:56:43 wiz Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -35,7 +35,7 @@ .Nd USB generic device support .Sh SYNOPSIS .Cd "ugen* at uhub? flags N" -.Cd "ugen* at uhub? vendor V product P configuration C interface I flags 1 +.Cd "ugen* at uhub? vendor V product P configuration C interface I flags 1" .Sh DESCRIPTION The .Nm @@ -178,11 +178,11 @@ All endpoints handle the following calls: .Pp .Bl -tag -width indent -compact -.It Dv USB_SET_SHORT_XFER (int) +.It Dv USB_SET_SHORT_XFER ( int ) Allow short read transfer. Normally a transfer from the device which is shorter than the request specified is reported as an error. -.It Dv USB_SET_TIMEOUT (int) +.It Dv USB_SET_TIMEOUT ( int ) Set the timeout on the device operations, the time is specified in milliseconds. The value 0 is used to indicate that there is no timeout. @@ -193,14 +193,14 @@ The control endpoint (endpoint 0) handle calls: .Pp .Bl -tag -width indent -compact -.It Dv USB_GET_CONFIG (int) +.It Dv USB_GET_CONFIG ( int ) Get the device configuration number. -.It Dv USB_SET_CONFIG (int) +.It Dv USB_SET_CONFIG ( int ) Set the device into the given configuration number. .Pp This operation can only be performed when the control endpoint is the sole open endpoint. -.It Dv USB_GET_ALTINTERFACE (struct usb_alt_interface) +.It Dv USB_GET_ALTINTERFACE ( struct usb_alt_interface ) Get the alternative setting number for the interface with the given index. The @@ -213,7 +213,7 @@ struct usb_alt_interface { int uai_alt_no; }; .Ed -.It Dv USB_SET_ALTINTERFACE (struct usb_alt_interface) +.It Dv USB_SET_ALTINTERFACE ( struct usb_alt_interface ) Set the alternative setting to the given number in the interface with the given index. The @@ -222,13 +222,13 @@ is ignored in this call. .Pp This operation can only be performed when no endpoints for the interface are open. -.It Dv USB_GET_NO_ALT (struct usb_alt_interface) +.It Dv USB_GET_NO_ALT ( struct usb_alt_interface ) Return the number of different alternate settings in the .Dv uai_alt_no field. -.It Dv USB_GET_DEVICE_DESC (usb_device_descriptor_t) +.It Dv USB_GET_DEVICE_DESC ( usb_device_descriptor_t ) Return the device descriptor. -.It Dv USB_GET_CONFIG_DESC (struct usb_config_desc) +.It Dv USB_GET_CONFIG_DESC ( struct usb_config_desc ) Return the descriptor for the configuration with the given index. For convenience the current configuration can be specified by .Dv USB_CURRENT_CONFIG_INDEX . @@ -238,7 +238,7 @@ struct usb_config_desc { usb_config_descriptor_t ucd_desc; }; .Ed -.It Dv USB_GET_INTERFACE_DESC (struct usb_interface_desc) +.It Dv USB_GET_INTERFACE_DESC ( struct usb_interface_desc ) Return the interface descriptor for an interface specified by its configuration index, interface index, and alternative index. For convenience the current alternative can be specified by @@ -251,7 +251,7 @@ struct usb_interface_desc { usb_interface_descriptor_t uid_desc; }; .Ed -.It Dv USB_GET_ENDPOINT_DESC (struct usb_endpoint_desc) +.It Dv USB_GET_ENDPOINT_DESC ( struct usb_endpoint_desc ) Return the endpoint descriptor for the endpoint specified by its configuration index, interface index, alternative index, and endpoint index. @@ -264,7 +264,7 @@ struct usb_endpoint_desc { usb_endpoint_descriptor_t ued_desc; }; .Ed -.It Dv USB_GET_FULL_DESC (struct usb_full_desc) +.It Dv USB_GET_FULL_DESC ( struct usb_full_desc ) Return all the descriptors for the given configuration. .Bd -literal struct usb_full_desc { @@ -283,7 +283,7 @@ The proper size can be determined by fir and inspecting the .Dv wTotalLength field. -.It Dv USB_GET_STRING_DESC (struct usb_string_desc) +.It Dv USB_GET_STRING_DESC ( struct usb_string_desc ) Get a string descriptor for the given language id and string index. .Bd -literal @@ -322,7 +322,7 @@ This is a dangerous operation in that it on the device. Some of the most dangerous (e.g., changing the device address) are not allowed. -.It Dv USB_GET_DEVICEINFO (struct usb_device_info) +.It Dv USB_GET_DEVICEINFO ( struct usb_device_info ) Get an information summary for the device. This call will not issue any USB transactions. .El @@ -332,7 +332,7 @@
CVS commit: src/share/man/man4
Module Name:src Committed By: ws Date: Tue Feb 20 15:50:02 UTC 2018 Modified Files: src/share/man/man4: ugen.4 Log Message: Add description of how to attach ugen to only some of the interfaces found in a device. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/share/man/man4/ugen.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/ugen.4 diff -u src/share/man/man4/ugen.4:1.32 src/share/man/man4/ugen.4:1.33 --- src/share/man/man4/ugen.4:1.32 Mon Jul 3 21:30:58 2017 +++ src/share/man/man4/ugen.4 Tue Feb 20 15:50:02 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ugen.4,v 1.32 2017/07/03 21:30:58 wiz Exp $ +.\" $NetBSD: ugen.4,v 1.33 2018/02/20 15:50:02 ws Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -35,6 +35,7 @@ .Nd USB generic device support .Sh SYNOPSIS .Cd "ugen* at uhub? flags N" +.Cd "ugen* at uhub? vendor V product P configuration C interface I flags 1 .Sh DESCRIPTION The .Nm @@ -60,6 +61,40 @@ locators this can be used to force the driver to be used for a certain device. .Pp +The second form of attachment can be used to +.Dq steal +only one interface from some device for use by the +.Nm +driver. +Be sure to include +.Dq flags 1 +on the attachment. +.Em NOTE : +You have to be extremely careful, +when using this, +as the attached +.Nm +driver has access to all of the device +and can easily interfere with the driver used for +the other interface(s). +.Pp +As an example of this second form of attachment there are +various debugging boards available based on some FTDI chip, +where one interface is used for JTAG debugging +and the other is used as a serial interface. +In this case you want to attach the +.Nm +driver to interface 0 +while using +.Xr uftdi 4 +together with +.Xr ucom 4 +at interface 1 of this particular board +identified by +.Cd vendor +and +.Cd product . +.Pp There can be up to 127 USB devices connected to a USB bus. Each USB device can have up to 16 endpoints. Each of these endpoints will communicate in one of four different
CVS commit: src/sys/dev/usb
Module Name:src Committed By: ws Date: Tue Feb 20 15:48:37 UTC 2018 Modified Files: src/sys/dev/usb: files.usb uftdi.c ugen.c Log Message: Attach uftdi to each interface found in the device separately. This allows for other drivers (e.g. ugen) to attach to some of the other interfaces. Allow ugen to attach only to some of the interfaces found in a device. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/dev/usb/files.usb cvs rdiff -u -r1.66 -r1.67 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.137 -r1.138 src/sys/dev/usb/ugen.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/usb/files.usb diff -u src/sys/dev/usb/files.usb:1.148 src/sys/dev/usb/files.usb:1.149 --- src/sys/dev/usb/files.usb:1.148 Sun Dec 10 17:03:07 2017 +++ src/sys/dev/usb/files.usb Tue Feb 20 15:48:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.148 2017/12/10 17:03:07 bouyer Exp $ +# $NetBSD: files.usb,v 1.149 2018/02/20 15:48:37 ws Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -138,6 +138,7 @@ file dev/usb/ucom.c ucom | ucombus ne # Generic devices device ugen attach ugen at usbdevif +attach ugen at usbifif with ugenif file dev/usb/ugen.c ugen needs-flag @@ -387,7 +388,7 @@ file dev/usb/umodem.c umodem # FTDI serial driver device uftdi: ucombus -attach uftdi at usbdevif +attach uftdi at usbifif file dev/usb/uftdi.c uftdi # Prolific PL2303 serial driver Index: src/sys/dev/usb/uftdi.c diff -u src/sys/dev/usb/uftdi.c:1.66 src/sys/dev/usb/uftdi.c:1.67 --- src/sys/dev/usb/uftdi.c:1.66 Fri Dec 22 14:18:29 2017 +++ src/sys/dev/usb/uftdi.c Tue Feb 20 15:48:37 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uftdi.c,v 1.66 2017/12/22 14:18:29 jakllsch Exp $ */ +/* $NetBSD: uftdi.c,v 1.67 2018/02/20 15:48:37 ws Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.66 2017/12/22 14:18:29 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.67 2018/02/20 15:48:37 ws Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -62,9 +62,7 @@ int uftdidebug = 0; #define DPRINTFN(n,x) #endif -#define UFTDI_CONFIG_INDEX 0 -#define UFTDI_IFACE_INDEX 0 -#define UFTDI_MAX_PORTS 4 +#define UFTDI_CONFIG_NO 1 /* * These are the default number of bytes transferred per frame if the @@ -83,17 +81,17 @@ int uftdidebug = 0; struct uftdi_softc { device_t sc_dev; /* base device */ struct usbd_device * sc_udev; /* device */ - struct usbd_interface * sc_iface[UFTDI_MAX_PORTS]; /* interface */ + struct usbd_interface * sc_iface; /* interface */ + int sc_iface_no; enum uftdi_type sc_type; u_int sc_hdrlen; - u_int sc_numports; u_int sc_chiptype; u_char sc_msr; u_char sc_lsr; - device_t sc_subdev[UFTDI_MAX_PORTS]; + device_t sc_subdev; u_char sc_dying; @@ -190,29 +188,30 @@ CFATTACH_DECL2_NEW(uftdi, sizeof(struct int uftdi_match(device_t parent, cfdata_t match, void *aux) { - struct usb_attach_arg *uaa = aux; + struct usbif_attach_arg *uiaa = aux; DPRINTFN(20,("uftdi: vendor=0x%x, product=0x%x\n", - uaa->uaa_vendor, uaa->uaa_product)); + uiaa->uiaa_vendor, uiaa->uiaa_product)); - return uftdi_lookup(uaa->uaa_vendor, uaa->uaa_product) != NULL ? - UMATCH_VENDOR_PRODUCT : UMATCH_NONE; + if (uiaa->uiaa_configno != UFTDI_CONFIG_NO) + return UMATCH_NONE; + + return uftdi_lookup(uiaa->uiaa_vendor, uiaa->uiaa_product) != NULL ? + UMATCH_VENDOR_PRODUCT_CONF_IFACE : UMATCH_NONE; } void uftdi_attach(device_t parent, device_t self, void *aux) { struct uftdi_softc *sc = device_private(self); - struct usb_attach_arg *uaa = aux; - struct usbd_device *dev = uaa->uaa_device; - struct usbd_interface *iface; + struct usbif_attach_arg *uiaa = aux; + struct usbd_device *dev = uiaa->uiaa_device; + struct usbd_interface *iface = uiaa->uiaa_iface; usb_device_descriptor_t *ddesc; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; char *devinfop; - const char *devname = device_xname(self); - int i,idx; - usbd_status err; + int i; struct ucom_attach_args ucaa; DPRINTFN(10,("\nuftdi_attach: sc=%p\n", sc)); @@ -224,122 +223,86 @@ uftdi_attach(device_t parent, device_t s aprint_normal_dev(self, "%s\n", devinfop); usbd_devinfo_free(devinfop); - /* Move the device into the configured state. */ - err = usbd_set_config_index(dev, UFTDI_CONFIG_INDEX, 1); - if (err) { - aprint_error("\n%s: failed to set configuration, err=%s\n", - devname, usbd_errstr(err)); - goto bad; - } - sc->sc_dev = self; sc->sc_udev = dev; - sc->sc_numports = 1; + sc->sc_iface_no = uiaa->uiaa_ifaceno; sc->sc_type = UFTDI_TYPE_8U232AM; /* most devices are post-8U232AM */ sc->sc_hdrlen = 0; - if (uaa->uaa_vendor == USB_VENDOR_FTDI - &&
CVS commit: src/share/mk
Module Name:src Committed By: martin Date: Tue Feb 20 12:49:40 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch sparc back to old openssl - needs more work and testing. To generate a diff of this commit: cvs rdiff -u -r1.1035 -r1.1036 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1035 src/share/mk/bsd.own.mk:1.1036 --- src/share/mk/bsd.own.mk:1.1035 Mon Feb 19 20:52:09 2018 +++ src/share/mk/bsd.own.mk Tue Feb 20 12:49:40 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1035 2018/02/19 20:52:09 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1036 2018/02/20 12:49:40 martin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -102,8 +102,7 @@ MKGCCCMDS?= no # .if ${MACHINE} == "amd64" || \ ${MACHINE} == "i386" || \ -${MACHINE} == "sparc64" || \ -${MACHINE} == "sparc" +${MACHINE} == "sparc64" HAVE_OPENSSL?= 11 .else HAVE_OPENSSL?= 10
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc
Module Name:src Committed By: martin Date: Tue Feb 20 12:48:46 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: aes-sparcv9.S aest4-sparcv9.S bn-sparcv8.S cmllt4-sparcv9.S des_enc-sparc.S dest4-sparcv9.S ghash-sparcv9.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S Removed Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: aesfx-sparcv9.S ec.inc ecp_nistz256-sparcv9.S poly1305-sparcv9.S poly1305.inc sparcv9_modes.S Log Message: Backout previous "regen" - the regen target in this directory is bogus, there is no "sparcv9" nor any "vis" in the default CPU targets for NetBSD/sparc. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes-sparcv9.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aest4-sparcv9.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn-sparcv8.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/cmllt4-sparcv9.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/dest4-sparcv9.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparcv9-mont.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparcv9a-mont.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/vis3-mont.S cvs rdiff -u -r1.1 -r0 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aesfx-sparcv9.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/ec.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/ecp_nistz256-sparcv9.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/poly1305-sparcv9.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/poly1305.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/sparcv9_modes.S cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/des_enc-sparc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/ghash-sparcv9.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes-sparcv9.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes-sparcv9.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes-sparcv9.S:1.3 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes-sparcv9.S:1.2 Sun Feb 18 23:38:47 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes-sparcv9.S Tue Feb 20 12:48:46 2018 @@ -1,9 +1,3 @@ -#include "sparc_arch.h" - -#ifdef __arch64__ -.register %g2,#scratch -.register %g3,#scratch -#endif .section ".text",#alloc,#execinstr .align 256 @@ -302,8 +296,8 @@ AES_Te: .align 64 .skip 16 _sparcv9_AES_encrypt: - save %sp,-STACK_FRAME-16,%sp - stx %i7,[%sp+STACK_BIAS+STACK_FRAME+0] ! off-load return address + save %sp,-112-16,%sp + stx %i7,[%sp+0+112+0] ! off-load return address ld [%i5+240],%i7 ld [%i5+0],%l4 ld [%i5+4],%l5 ! @@ -591,7 +585,7 @@ _sparcv9_AES_encrypt: ldub [%i7+%g5],%g5 sll %o0,16,%o0 xor %l0,%i0,%i0 - ldx [%sp+STACK_BIAS+STACK_FRAME+0],%i7 ! restore return address + ldx [%sp+0+112+0],%i7 ! restore return address sll %o1,8,%o1 ! xor %o0,%i0,%i0 @@ -629,7 +623,7 @@ AES_encrypt: or %o0,%o1,%g1 andcc %g1,3,%g0 bnz,pn %xcc,.Lunaligned_enc - save %sp,-STACK_FRAME,%sp + save %sp,-112,%sp ld [%i0+0],%o0 ld [%i0+4],%o1 @@ -1034,8 +1028,8 @@ AES_Td: .align 64 .skip 16 _sparcv9_AES_decrypt: - save %sp,-STACK_FRAME-16,%sp - stx %i7,[%sp+STACK_BIAS+STACK_FRAME+0] ! off-load return address + save %sp,-112-16,%sp + stx %i7,[%sp+0+112+0] ! off-load return address ld [%i5+240],%i7 ld [%i5+0],%l4 ld [%i5+4],%l5 ! @@ -1323,7 +1317,7 @@ _sparcv9_AES_decrypt: ldub [%i7+%g5],%g5 sll %o0,16,%o0 xor %l0,%i0,%i0 - ldx [%sp+STACK_BIAS+STACK_FRAME+0],%i7 ! restore return address + ldx [%sp+0+112+0],%i7 ! restore return address sll %o1,8,%o1 ! xor %o0,%i0,%i0 @@ -1361,7 +1355,7 @@ AES_decrypt: or %o0,%o1,%g1 andcc %g1,3,%g0 bnz,pn %xcc,.Lunaligned_dec - save %sp,-STACK_FRAME,%sp + save %sp,-112,%sp ld [%i0+0],%o0 ld [%i0+4],%o1 Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aest4-sparcv9.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aest4-sparcv9.S:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aest4-sparcv9.S:1.3 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aest4-sparcv9.S:1.2 Sun Feb 18 23:38:47 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aest4-sparcv9.S Tue Feb 20 12:48:46 2018 @@ -1,10 +1,3 @@ -#include "sparc_arch.h" - -#ifdef __arch64__ -.register %g2,#scratch -.register %g3,#scratch -#endif - .text .globl aes_t4_encrypt @@ -515,9 +508,9 @@ _aes128_load_deckey=_aes128_loadkey .globl
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Tue Feb 20 09:37:56 UTC 2018 Modified Files: src/share/man/man4: gpio.4 Log Message: Whitespace improvements. Remove unnecessary Tn. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/gpio.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/gpio.4 diff -u src/share/man/man4/gpio.4:1.31 src/share/man/man4/gpio.4:1.32 --- src/share/man/man4/gpio.4:1.31 Tue Feb 20 09:07:18 2018 +++ src/share/man/man4/gpio.4 Tue Feb 20 09:37:56 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpio.4,v 1.31 2018/02/20 09:07:18 pgoyette Exp $ +.\" $NetBSD: gpio.4,v 1.32 2018/02/20 09:37:56 wiz Exp $ .\" $OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko@@ -40,13 +40,10 @@ .Sh DESCRIPTION The .Nm -device attaches to the -.Tn GPIO -controller and provides a uniform programming interface to its pins. -.Pp -Each -.Tn GPIO -controller with an attached +device attaches to the GPIO controller and provides a uniform +programming interface to its pins. +.Pp +Each GPIO controller with an attached .Nm device has an associated device file under the .Pa /dev @@ -76,10 +73,8 @@ The following structures and constants a header file: .Pp .Bl -tag -width -compact -.It Dv GPIOINFO (struct gpio_info) -Returns information about the -.Tn GPIO -controller in the +.It Dv GPIOINFO ( struct gpio_info ) +Returns information about the GPIO controller in the .Fa gpio_info structure: .Bd -literal @@ -88,7 +83,7 @@ struct gpio_info { }; .Ed .Pp -.It Dv GPIOREAD (struct gpio_req) +.It Dv GPIOREAD ( struct gpio_req ) Returns the input pin value in the .Fa gpio_pin_op structure: @@ -108,7 +103,7 @@ or .Fa gp_pin field must be set before calling. .Pp -.It Dv GPIOWRITE (struct gpio_req) +.It Dv GPIOWRITE ( struct gpio_req ) Writes the output value to the pin. The value set in the .Fa gp_value @@ -121,12 +116,12 @@ On return, the .Fa gp_value field contains the old pin state. .Pp -.It Dv GPIOTOGGLE (struct gpio_req) +.It Dv GPIOTOGGLE ( struct gpio_req ) Toggles the pin output value, i.e. changes it to the opposite. .Fa gp_value field is ignored and on return contains the old pin state. .Pp -.It Dv GPIOSET (struct gpio_set) +.It Dv GPIOSET ( struct gpio_set ) Changes pin configuration flags with the new ones provided in the .Fa gpio_set structure: @@ -191,11 +186,11 @@ Only GPIO pins that have been set using .Ar GPIOSET will be accessible at securelevels greater than 0. .Pp -.It Dv GPIOUNSET (struct gpio_set) +.It Dv GPIOUNSET ( struct gpio_set ) Unset the specified pin, i.e. clear its name and make it unaccessible at securelevels greater than 0. .Pp -.It Dv GPIOATTACH (struct gpio_attach) +.It Dv GPIOATTACH ( struct gpio_attach ) Attach the device described in the .Fa gpio_attach structure on this gpio device.
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: wiz Date: Tue Feb 20 09:36:26 UTC 2018 Modified Files: src/lib/libc/stdio: setbuf.3 Log Message: Remove ineffective macros and arguments. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/stdio/setbuf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/setbuf.3 diff -u src/lib/libc/stdio/setbuf.3:1.15 src/lib/libc/stdio/setbuf.3:1.16 --- src/lib/libc/stdio/setbuf.3:1.15 Tue Feb 20 02:52:41 2018 +++ src/lib/libc/stdio/setbuf.3 Tue Feb 20 09:36:26 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: setbuf.3,v 1.15 2018/02/20 02:52:41 kamil Exp $ +.\" $NetBSD: setbuf.3,v 1.16 2018/02/20 09:36:26 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -75,12 +75,12 @@ The environment variable value is a lett value indicating the size of the buffer. Valid sizes range from 0B to 1MB. Valid letters are: -.Bl -tag -width X -indent -.It Dv Li U +.Bl -tag -width X +.It Li U Unbuffered. -.It Dv Li L +.It Li L Line-buffered. -.It Dv Li F +.It Li F Fully-buffered. .El .Pp @@ -91,9 +91,7 @@ may be used to force the block out early .Xr fclose 3 . ) .Pp Normally all files are block buffered. -When the first -.Tn I/O -operation occurs on a file, +When the first I/O operation occurs on a file, .Xr malloc 3 is called, and an optimally-sized buffer is obtained. @@ -153,9 +151,7 @@ but may have peculiar side effects (such as discarding input or flushing output) if the stream is ``active''. Portable applications should call it only once on any given stream, -and before any -.Tn I/O -is performed. +and before any I/O is performed. .Pp The other three calls are, in effect, simply aliases for calls to .Fn setvbuf .
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: knakahara Date: Tue Feb 20 08:49:23 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Improve a comment about reading EICS register defined write-only by spec. It seems that is workaround for silicon errata. ok by msaitoh@n.o. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.124 src/sys/dev/pci/ixgbe/ixgbe.c:1.125 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.124 Tue Feb 20 07:24:37 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Tue Feb 20 08:49:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.124 2018/02/20 07:24:37 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.125 2018/02/20 08:49:23 knakahara Exp $ */ /** @@ -2838,6 +2838,12 @@ ixgbe_msix_link(void *arg) IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_OTHER); /* First get the cause */ + /* + * The specifications of 82598, 82599, X540 and X550 say EICS register + * is write only. However, Linux says it is a workaround for silicon + * errata to read EICS instead of EICR to get interrupt cause. It seems + * there is a problem about read clear mechanism for EICR register. + */ eicr = IXGBE_READ_REG(hw, IXGBE_EICS); /* Be sure the queue bits are not cleared */ eicr &= ~IXGBE_EICR_RTX_QUEUE;