summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-03-18 12:38:10 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-03-18 12:38:10 +0000
commitf596c0900965f1168f07b20b94337167854044c3 (patch)
tree4ca9f49e776a7a6b7bb287c78ef7a9ef0316da91 /usr/src
parente71bdde53b9f83f6302134fc3592cc5a5ebfe91f (diff)
parent945e3b4bc345679cad92f0a896670030a411c8f8 (diff)
downloadillumos-joyent-f596c0900965f1168f07b20b94337167854044c3.tar.gz
[illumos-gate merge]
commit 945e3b4bc345679cad92f0a896670030a411c8f8 10089 phy_check() is bitwise, should be streetwise commit 618d207ffd5dca94c4a4715afd5a15b0025530ea 10495 libc should know how many FPU exceptions there are commit 6760681825872e5ab549ae9309431453fa97e428 10548 libumem doesn't free memory allocated by valloc or memalign commit 10ea3ab2fe049f8d68567cf4cb2e04fda1e4645b 10553 ipadm.1m should document hostmodel property commit fec53dd46f43e58822d823ac73a281d6f0a1e782 10511 loader: comconsole comc_setup should return boolean commit 2c26b085561320ff0be162e984d17279aafda6a9 10493 pts: cast between incompatible function types commit 74d419caec602f7f32a3bdea419b7f3155d3eebc 10492 ptsl: cast between incompatible function types commit e2b861771c2991875108755a59b246b86f928eab 10490 ptm: cast between incompatible function types commit ff2c0cbf8b71c56c475188b2be1d96686bc645e9 10489 mr_sas: cast between incompatible function types commit 91f8444216cbe1f7457a80ed179210c918674c8b 10488 nxge: cast between incompatible function types commit 63638116bbacd9d275b00b4602da8dca12542a53 10487 nca: cast between incompatible function types
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/boot/Makefile.version2
-rw-r--r--usr/src/boot/sys/boot/efi/loader/comconsole.c63
-rw-r--r--usr/src/boot/sys/boot/i386/libi386/comconsole.c48
-rw-r--r--usr/src/head/floatingpoint.h2
-rw-r--r--usr/src/lib/libc/port/fp/sigfpe.c5
-rw-r--r--usr/src/lib/libumem/common/vmem.c18
-rw-r--r--usr/src/man/man1m/ipadm.1m12
-rw-r--r--usr/src/man/man3c/sigfpe.3c14
-rw-r--r--usr/src/uts/common/inet/nca/ncaddi.c16
-rw-r--r--usr/src/uts/common/io/mii/mii.c6
-rw-r--r--usr/src/uts/common/io/mr_sas/mr_sas.c12
-rw-r--r--usr/src/uts/common/io/nxge/nxge_mac.c39
-rw-r--r--usr/src/uts/common/io/ptm.c33
-rw-r--r--usr/src/uts/common/io/pts.c35
-rw-r--r--usr/src/uts/common/io/tty_pts.c12
-rw-r--r--usr/src/uts/common/sys/ieeefp.h6
16 files changed, 188 insertions, 135 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version
index 5b10c5b63d..646545a76c 100644
--- a/usr/src/boot/Makefile.version
+++ b/usr/src/boot/Makefile.version
@@ -33,4 +33,4 @@ LOADER_VERSION = 1.1
# Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes.
# The version is processed from left to right, the version number can only
# be increased.
-BOOT_VERSION = $(LOADER_VERSION)-2019.02.26.2
+BOOT_VERSION = $(LOADER_VERSION)-2019.03.07.1
diff --git a/usr/src/boot/sys/boot/efi/loader/comconsole.c b/usr/src/boot/sys/boot/efi/loader/comconsole.c
index c46971eeda..6f3eed7aa1 100644
--- a/usr/src/boot/sys/boot/efi/loader/comconsole.c
+++ b/usr/src/boot/sys/boot/efi/loader/comconsole.c
@@ -28,6 +28,7 @@
#include <stand.h>
#include <sys/errno.h>
#include <bootstrap.h>
+#include <stdbool.h>
#include <efi.h>
#include <efilib.h>
@@ -59,7 +60,7 @@ static void comc_putchar(struct console *, int);
static int comc_getchar(struct console *);
static int comc_ischar(struct console *);
static int comc_ioctl(struct console *, int, void *);
-static void comc_setup(struct console *);
+static bool comc_setup(struct console *);
static char *comc_asprint_mode(struct serial *);
static int comc_parse_mode(struct serial *, const char *);
static int comc_mode_set(struct env_var *, int, const void *);
@@ -243,18 +244,20 @@ comc_probe(struct console *cp)
port->rtsdtr_off? "true" : "false");
unsetenv(name);
env_setenv(name, EV_VOLATILE, value, comc_rtsdtr_set, env_nounset);
- comc_setup(cp);
+
+ cp->c_flags = 0;
+ if (comc_setup(cp))
+ cp->c_flags = C_PRESENTIN | C_PRESENTOUT;
}
static int
comc_init(struct console *cp, int arg __attribute((unused)))
{
- comc_setup(cp);
-
- if ((cp->c_flags & (C_PRESENTIN | C_PRESENTOUT)) ==
- (C_PRESENTIN | C_PRESENTOUT))
+ if (comc_setup(cp))
return (CMD_OK);
+
+ cp->c_flags = 0;
return (CMD_ERROR);
}
@@ -495,7 +498,8 @@ comc_mode_set(struct env_var *ev, int flags, const void *value)
if (comc_parse_mode(cp->c_private, value) == CMD_ERROR)
return (CMD_ERROR);
- comc_setup(cp);
+ (void) comc_setup(cp);
+
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
return (CMD_OK);
@@ -521,7 +525,8 @@ comc_cd_set(struct env_var *ev, int flags, const void *value)
else
return (CMD_ERROR);
- comc_setup(cp);
+ (void) comc_setup(cp);
+
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
return (CMD_OK);
@@ -547,50 +552,48 @@ comc_rtsdtr_set(struct env_var *ev, int flags, const void *value)
else
return (CMD_ERROR);
- comc_setup(cp);
+ (void) comc_setup(cp);
+
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
return (CMD_OK);
}
-static void
+/*
+ * In case of error, we also reset ACTIVE flags, so the console
+ * framefork will try alternate consoles.
+ */
+static bool
comc_setup(struct console *cp)
{
EFI_STATUS status;
UINT32 control;
struct serial *sp = cp->c_private;
- if ((cp->c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0)
- return;
-
/* port is not usable */
- if (sp->sio == NULL) {
- cp->c_flags &= ~(C_PRESENTIN | C_PRESENTOUT);
- return;
- }
+ if (sp->sio == NULL)
+ return (false);
- cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT);
status = sp->sio->Reset(sp->sio);
- if (EFI_ERROR(status)) {
- cp->c_flags &= ~(C_PRESENTIN | C_PRESENTOUT);
- }
+ if (EFI_ERROR(status))
+ return (false);
status = sp->sio->SetAttributes(sp->sio, sp->baudrate, 0, 0, sp->parity,
sp->databits, sp->stopbits);
- if (EFI_ERROR(status)) {
- cp->c_flags &= ~(C_PRESENTIN | C_PRESENTOUT);
- }
+ if (EFI_ERROR(status))
+ return (false);
if (sp->rtsdtr_off) {
status = sp->sio->GetControl(sp->sio, &control);
- if (EFI_ERROR(status)) {
- cp->c_flags &= ~(C_PRESENTIN | C_PRESENTOUT);
- }
+ if (EFI_ERROR(status))
+ return (false);
control &= ~(EFI_SERIAL_REQUEST_TO_SEND |
EFI_SERIAL_DATA_TERMINAL_READY);
status = sp->sio->SetControl(sp->sio, control);
- if (EFI_ERROR(status)) {
- cp->c_flags &= ~(C_PRESENTIN | C_PRESENTOUT);
- }
+ if (EFI_ERROR(status))
+ return (false);
}
+ /* Mark this port usable. */
+ cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT);
+ return (true);
}
diff --git a/usr/src/boot/sys/boot/i386/libi386/comconsole.c b/usr/src/boot/sys/boot/i386/libi386/comconsole.c
index ab309c1aca..a1e120a692 100644
--- a/usr/src/boot/sys/boot/i386/libi386/comconsole.c
+++ b/usr/src/boot/sys/boot/i386/libi386/comconsole.c
@@ -27,6 +27,7 @@
#include <stand.h>
#include <bootstrap.h>
+#include <stdbool.h>
#include <machine/cpufunc.h>
#include <dev/ic/ns16550.h>
#include <dev/pci/pcireg.h>
@@ -77,7 +78,7 @@ static int comc_ioctl(struct console *, int, void *);
static uint32_t comc_parse_pcidev(const char *);
static int comc_pcidev_set(struct env_var *, int, const void *);
static int comc_pcidev_handle(struct console *, uint32_t);
-static void comc_setup(struct console *);
+static bool comc_setup(struct console *);
static char *comc_asprint_mode(struct serial *);
static int comc_parse_mode(struct serial *, const char *);
static int comc_mode_set(struct env_var *, int, const void *);
@@ -226,18 +227,20 @@ comc_probe(struct console *cp)
unsetenv(name);
env_setenv(name, EV_VOLATILE, env, comc_pcidev_set, env_nounset);
- comc_setup(cp);
+
+ cp->c_flags = 0;
+ if (comc_setup(cp))
+ cp->c_flags = C_PRESENTIN | C_PRESENTOUT;
}
static int
comc_init(struct console *cp, int arg __attribute((unused)))
{
- comc_setup(cp);
-
- if ((cp->c_flags & (C_PRESENTIN | C_PRESENTOUT)) ==
- (C_PRESENTIN | C_PRESENTOUT))
+ if (comc_setup(cp))
return (CMD_OK);
+
+ cp->c_flags = 0;
return (CMD_ERROR);
}
@@ -408,7 +411,7 @@ comc_mode_set(struct env_var *ev, int flags, const void *value)
if (comc_parse_mode(cp->c_private, value) == CMD_ERROR)
return (CMD_ERROR);
- comc_setup(cp);
+ (void) comc_setup(cp);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -435,7 +438,7 @@ comc_cd_set(struct env_var *ev, int flags, const void *value)
else
return (CMD_ERROR);
- comc_setup(cp);
+ (void) comc_setup(cp);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -462,7 +465,7 @@ comc_rtsdtr_set(struct env_var *ev, int flags, const void *value)
else
return (CMD_ERROR);
- comc_setup(cp);
+ (void) comc_setup(cp);
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -539,7 +542,8 @@ comc_pcidev_handle(struct console *cp, uint32_t locator)
}
port &= PCIM_BAR_IO_BASE;
- comc_setup(cp);
+ (void) comc_setup(cp);
+
sp->locator = locator;
return (CMD_OK);
@@ -572,15 +576,24 @@ comc_pcidev_set(struct env_var *ev, int flags, const void *value)
return (CMD_OK);
}
-static void
+/*
+ * In case of error, we also reset ACTIVE flags, so the console
+ * framefork will try alternate consoles.
+ */
+static bool
comc_setup(struct console *cp)
{
struct serial *sp = cp->c_private;
static int TRY_COUNT = 1000000;
int tries;
- if ((cp->c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0)
- return;
+#define COMC_TEST 0xbb
+ /*
+ * Write byte to scratch register and read it out.
+ */
+ outb(sp->ioaddr + com_scr, COMC_TEST);
+ if (inb(sp->ioaddr + com_scr) != COMC_TEST)
+ return (false);
outb(sp->ioaddr + com_cfcr, CFCR_DLAB | sp->lcr);
outb(sp->ioaddr + com_dlbl, COMC_BPS(sp->speed) & 0xff);
@@ -594,10 +607,11 @@ comc_setup(struct console *cp)
inb(sp->ioaddr + com_data);
} while (inb(sp->ioaddr + com_lsr) & LSR_RXRDY && ++tries < TRY_COUNT);
- if (tries < TRY_COUNT)
- cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT);
- else
- cp->c_flags &= ~(C_PRESENTIN | C_PRESENTOUT);
+ if (tries == TRY_COUNT)
+ return (false);
+ /* Mark this port usable. */
+ cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT);
+ return (true);
}
static int
diff --git a/usr/src/head/floatingpoint.h b/usr/src/head/floatingpoint.h
index 1935b611c6..c8d658cc83 100644
--- a/usr/src/head/floatingpoint.h
+++ b/usr/src/head/floatingpoint.h
@@ -62,8 +62,6 @@ extern "C" {
typedef __FILE FILE;
#endif
-#define N_IEEE_EXCEPTION 5 /* Number of floating-point exceptions. */
-
typedef int sigfpe_code_type; /* Type of SIGFPE code. */
typedef void (*sigfpe_handler_type)(); /* Pointer to exception handler */
diff --git a/usr/src/lib/libc/port/fp/sigfpe.c b/usr/src/lib/libc/port/fp/sigfpe.c
index 9b1942423f..dca4e3428a 100644
--- a/usr/src/lib/libc/port/fp/sigfpe.c
+++ b/usr/src/lib/libc/port/fp/sigfpe.c
@@ -150,6 +150,11 @@ _sigfpe_master(int sig, siginfo_t *siginfo, void *arg)
case FPE_FLTOVF:
exception = fp_overflow;
goto ieee;
+#if defined(__i386) || defined(__amd64)
+ case FPE_FLTDEN:
+ exception = fp_denormalized;
+ goto ieee;
+#endif
default: /* The common default treatment is to abort. */
break;
}
diff --git a/usr/src/lib/libumem/common/vmem.c b/usr/src/lib/libumem/common/vmem.c
index c868e42977..f66cccc698 100644
--- a/usr/src/lib/libumem/common/vmem.c
+++ b/usr/src/lib/libumem/common/vmem.c
@@ -23,6 +23,7 @@
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2012 Joyent, Inc. All rights reserved.
+ * Copyright (c) 2017 by Delphix. All rights reserved.
*/
/*
@@ -458,12 +459,12 @@ vmem_span_create(vmem_t *vmp, void *vaddr, size_t size, uint8_t import)
span = vmem_seg_create(vmp, knext->vs_aprev, start, end);
span->vs_type = VMEM_SPAN;
+ span->vs_import = import;
VMEM_INSERT(knext->vs_kprev, span, k);
newseg = vmem_seg_create(vmp, span, start, end);
vmem_freelist_insert(vmp, newseg);
- newseg->vs_import = import;
if (import)
vmp->vm_kstat.vk_mem_import += size;
vmp->vm_kstat.vk_mem_total += size;
@@ -483,7 +484,7 @@ vmem_span_destroy(vmem_t *vmp, vmem_seg_t *vsp)
ASSERT(MUTEX_HELD(&vmp->vm_lock));
ASSERT(span->vs_type == VMEM_SPAN);
- if (vsp->vs_import)
+ if (span->vs_import)
vmp->vm_kstat.vk_mem_import -= size;
vmp->vm_kstat.vk_mem_total -= size;
@@ -686,7 +687,8 @@ vmem_advance(vmem_t *vmp, vmem_seg_t *walker, vmem_seg_t *afterme)
* vsp could represent a complete imported span,
* in which case we must return it to the source.
*/
- if (vsp != NULL && vsp->vs_import && vmp->vm_source_free != NULL &&
+ if (vsp != NULL && vsp->vs_aprev->vs_import &&
+ vmp->vm_source_free != NULL &&
vsp->vs_aprev->vs_type == VMEM_SPAN &&
vsp->vs_anext->vs_type == VMEM_SPAN) {
void *vaddr = (void *)vsp->vs_start;
@@ -813,7 +815,7 @@ vmem_nextfit_alloc(vmem_t *vmp, size_t size, int vmflag)
*/
void *
vmem_xalloc(vmem_t *vmp, size_t size, size_t align, size_t phase,
- size_t nocross, void *minaddr, void *maxaddr, int vmflag)
+ size_t nocross, void *minaddr, void *maxaddr, int vmflag)
{
vmem_seg_t *vsp;
vmem_seg_t *vbest = NULL;
@@ -1040,7 +1042,7 @@ vmem_xfree(vmem_t *vmp, void *vaddr, size_t size)
/*
* If the entire span is free, return it to the source.
*/
- if (vsp->vs_import && vmp->vm_source_free != NULL &&
+ if (vsp->vs_aprev->vs_import && vmp->vm_source_free != NULL &&
vsp->vs_aprev->vs_type == VMEM_SPAN &&
vsp->vs_anext->vs_type == VMEM_SPAN) {
vaddr = (void *)vsp->vs_start;
@@ -1364,7 +1366,7 @@ _vmem_extend_alloc(vmem_t *vmp, void *vaddr, size_t size, size_t alloc,
*/
void
vmem_walk(vmem_t *vmp, int typemask,
- void (*func)(void *, void *, size_t), void *arg)
+ void (*func)(void *, void *, size_t), void *arg)
{
vmem_seg_t *vsp;
vmem_seg_t *seg0 = &vmp->vm_seg0;
@@ -1428,8 +1430,8 @@ vmem_size(vmem_t *vmp, int typemask)
*/
vmem_t *
vmem_create(const char *name, void *base, size_t size, size_t quantum,
- vmem_alloc_t *afunc, vmem_free_t *ffunc, vmem_t *source,
- size_t qcache_max, int vmflag)
+ vmem_alloc_t *afunc, vmem_free_t *ffunc, vmem_t *source,
+ size_t qcache_max, int vmflag)
{
int i;
size_t nqcache;
diff --git a/usr/src/man/man1m/ipadm.1m b/usr/src/man/man1m/ipadm.1m
index 9935c346e9..0381aa130d 100644
--- a/usr/src/man/man1m/ipadm.1m
+++ b/usr/src/man/man1m/ipadm.1m
@@ -13,6 +13,7 @@
.\" Copyright (c) 2013 by Delphix. All rights reserved.
.\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright (c) 2016-2017, Chris Fraire <cfraire@me.com>.
+.\" Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
.\"
.Dd February 6, 2018
.Dt IPADM 1M
@@ -788,6 +789,17 @@ Packet forwarding
.Pq Cm on Ns / Ns Cm off .
.It Cm hoplimit
The IPv6 hoplimit.
+.It Cm hostmodel
+IP packet handling on multi-homed systems
+.Pq Cm weak Ns / Ns Cm strong Ns / Ns Cm src-priority
+.Pq IPv4/IPv6 .
+.Cm weak
+and
+.Cm strong
+correspond to the model definitions defined in RFC 1122.
+.Cm src-priority
+is a hybrid mode where outbound packets are sent from the interface with the
+packet's source address if possible.
.It Cm largest_anon_port
Largest ephemeral port
.Pq SCTP/TCP/UDP .
diff --git a/usr/src/man/man3c/sigfpe.3c b/usr/src/man/man3c/sigfpe.3c
index 5f40071c75..2067e19301 100644
--- a/usr/src/man/man3c/sigfpe.3c
+++ b/usr/src/man/man3c/sigfpe.3c
@@ -17,7 +17,6 @@ sigfpe \- signal handling for specific SIGFPE codes
.fi
.SH DESCRIPTION
-.sp
.LP
The \fBsigfpe()\fR function allows signal handling to be specified for
particular \fBSIGFPE\fR codes. A call to \fBsigfpe()\fR defines a new handler
@@ -41,6 +40,15 @@ FPE_FLTOVF fp_overflow \(mi floating-point overflow
FPE_FLTINV fp_invalid \(mi floating-point invalid operation
.fi
.in -2
+.LP
+And additionally on the x86 architecture:
+.sp
+.in +2
+.nf
+FPE_FLTDEN fp_denormalized \(mi floating-point denormalized result
+.fi
+.in -2
+
.sp
.LP
@@ -140,7 +148,6 @@ main(void) {
.in -2
.SH FILES
-.sp
.ne 2
.na
\fB\fB/usr/include/floatingpoint.h\fR\fR
@@ -161,7 +168,6 @@ main(void) {
.RE
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -177,12 +183,10 @@ MT-Level Safe
.TE
.SH SEE ALSO
-.sp
.LP
\fBsigaction\fR(2), \fBabort\fR(3C), \fBsignal\fR(3C), \fBattributes\fR(5),
\fBfloatingpoint.h\fR(3HEAD)
.SH DIAGNOSTICS
-.sp
.LP
The \fBsigfpe()\fR function returns (void(*)())-1 if \fIcode\fR is not zero or
a defined \fBSIGFPE\fR code.
diff --git a/usr/src/uts/common/inet/nca/ncaddi.c b/usr/src/uts/common/inet/nca/ncaddi.c
index e4fa85ef00..f02924d131 100644
--- a/usr/src/uts/common/inet/nca/ncaddi.c
+++ b/usr/src/uts/common/inet/nca/ncaddi.c
@@ -90,14 +90,15 @@ nca_close(queue_t *q, int flags __unused, cred_t *credp __unused)
return (0);
}
-static void
+static int
nca_rput(queue_t *q, mblk_t *mp)
{
/* Passthrough */
putnext(q, mp);
+ return (0);
}
-static void
+static int
nca_wput(queue_t *q, mblk_t *mp)
{
struct iocblk *iocp;
@@ -106,11 +107,11 @@ nca_wput(queue_t *q, mblk_t *mp)
iocp = (struct iocblk *)mp->b_rptr;
if (DB_TYPE(mp) == M_IOCTL && iocp->ioc_cmd == NCA_SET_IF) {
miocnak(q, mp, 0, ENOTSUP);
- return;
+ return (0);
}
/* Module, passthrough */
putnext(q, mp);
- return;
+ return (0);
}
switch (DB_TYPE(mp)) {
@@ -121,7 +122,7 @@ nca_wput(queue_t *q, mblk_t *mp)
case ND_GET:
if (! nd_getset(q, nca_g_nd, mp)) {
miocnak(q, mp, 0, ENOENT);
- return;
+ return (0);
}
qreply(q, mp);
break;
@@ -134,6 +135,7 @@ nca_wput(queue_t *q, mblk_t *mp)
freemsg(mp);
break;
}
+ return (0);
}
static struct module_info info = {
@@ -141,11 +143,11 @@ static struct module_info info = {
};
static struct qinit rinit = {
- (pfi_t)nca_rput, NULL, nca_open, nca_close, NULL, &info
+ nca_rput, NULL, nca_open, nca_close, NULL, &info
};
static struct qinit winit = {
- (pfi_t)nca_wput, NULL, nca_open, nca_close, NULL, &info
+ nca_wput, NULL, nca_open, nca_close, NULL, &info
};
struct streamtab ncainfo = {
diff --git a/usr/src/uts/common/io/mii/mii.c b/usr/src/uts/common/io/mii/mii.c
index b024899783..c2d8e5ad51 100644
--- a/usr/src/uts/common/io/mii/mii.c
+++ b/usr/src/uts/common/io/mii/mii.c
@@ -24,6 +24,10 @@
*/
/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
* mii - MII/PHY support for MAC drivers
*
* Utility module to provide a consistent interface to a MAC driver accross
@@ -1519,7 +1523,7 @@ debounce:
* gigabit modes cannot use legacy parallel detection.
*/
- if ((ph->phy_type == XCVR_1000T) &
+ if ((ph->phy_type == XCVR_1000T) &&
(anexp & MII_AN_EXP_LPCANAN)) {
/* check for gige */
diff --git a/usr/src/uts/common/io/mr_sas/mr_sas.c b/usr/src/uts/common/io/mr_sas/mr_sas.c
index 41aab85c68..fba65e5e07 100644
--- a/usr/src/uts/common/io/mr_sas/mr_sas.c
+++ b/usr/src/uts/common/io/mr_sas/mr_sas.c
@@ -98,7 +98,7 @@ static void *mrsas_state = NULL;
static volatile boolean_t mrsas_relaxed_ordering = B_TRUE;
volatile int debug_level_g = CL_NONE;
static volatile int msi_enable = 1;
-static volatile int ctio_enable = 1;
+static volatile int ctio_enable = 1;
/* Default Timeout value to issue online controller reset */
volatile int debug_timeout_g = 0xF0; /* 0xB4; */
@@ -143,7 +143,7 @@ static void mrsas_tran_dmafree(struct scsi_address *, struct scsi_pkt *);
static void mrsas_tran_sync_pkt(struct scsi_address *, struct scsi_pkt *);
static int mrsas_tran_quiesce(dev_info_t *dip);
static int mrsas_tran_unquiesce(dev_info_t *dip);
-static uint_t mrsas_isr();
+static uint_t mrsas_isr(caddr_t, caddr_t);
static uint_t mrsas_softintr();
static void mrsas_undo_resources(dev_info_t *, struct mrsas_instance *);
@@ -2289,7 +2289,7 @@ mrsas_tran_unquiesce(dev_info_t *dip)
/*
- * mrsas_isr(caddr_t)
+ * mrsas_isr(caddr_t, caddr_t)
*
* The Interrupt Service Routine
*
@@ -2297,8 +2297,9 @@ mrsas_tran_unquiesce(dev_info_t *dip)
*
*/
static uint_t
-mrsas_isr(struct mrsas_instance *instance)
+mrsas_isr(caddr_t arg1, caddr_t arg2 __unused)
{
+ struct mrsas_instance *instance = (struct mrsas_instance *)arg1;
int need_softintr;
uint32_t producer;
uint32_t consumer;
@@ -7352,8 +7353,7 @@ mrsas_add_intrs(struct mrsas_instance *instance, int intr_type)
/* Call ddi_intr_add_handler() */
for (i = 0; i < actual; i++) {
ret = ddi_intr_add_handler(instance->intr_htable[i],
- (ddi_intr_handler_t *)mrsas_isr, (caddr_t)instance,
- (caddr_t)(uintptr_t)i);
+ mrsas_isr, (caddr_t)instance, (caddr_t)(uintptr_t)i);
if (ret != DDI_SUCCESS) {
con_log(CL_ANN, (CE_WARN, "mrsas_add_intrs:"
diff --git a/usr/src/uts/common/io/nxge/nxge_mac.c b/usr/src/uts/common/io/nxge/nxge_mac.c
index ab325f3443..291272536d 100644
--- a/usr/src/uts/common/io/nxge/nxge_mac.c
+++ b/usr/src/uts/common/io/nxge/nxge_mac.c
@@ -2876,7 +2876,7 @@ fail:
static int
nxge_nlp2020_i2c_read(p_nxge_t nxgep, uint8_t ctrl_port, uint16_t address,
- uint16_t reg, uint8_t *data)
+ uint16_t reg, uint8_t *data)
{
int phy_dev, phy_reg;
uint16_t phy_data = 0;
@@ -3953,7 +3953,7 @@ nxge_tn1010_xcvr_init(p_nxge_t nxgep)
/*
* The following 4 lines actually overwrites what ever the ndd command
* has set. For example, by command
- * ndd -set /dev/nxge1 adv_autoneg_cap n (n = 0 or 1)
+ * ndd -set /dev/nxge1 adv_autoneg_cap n (n = 0 or 1)
* we could set param_arr[param_autoneg].value to n. However, because
* here we assign constants to these parameters, whatever we set with
* the "ndd -set" command will be replaced. So command
@@ -4314,8 +4314,8 @@ nxge_rx_mac_init(p_nxge_t nxgep)
uint8_t portn;
npi_handle_t handle;
npi_status_t rs = NPI_SUCCESS;
- uint16_t *addr16p;
- uint16_t addr0, addr1, addr2;
+ uint16_t *addr16p;
+ uint16_t addr0, addr1, addr2;
xmac_rx_config_t xconfig;
bmac_rx_config_t bconfig;
@@ -4505,7 +4505,7 @@ nxge_status_t
nxge_rx_mac_enable(p_nxge_t nxgep)
{
npi_handle_t handle;
- uint8_t portn;
+ uint8_t portn;
npi_status_t rs = NPI_SUCCESS;
nxge_status_t status = NXGE_OK;
@@ -5443,7 +5443,7 @@ fail:
nxge_status_t
nxge_mii_read(p_nxge_t nxgep, uint8_t xcvr_portn, uint8_t xcvr_reg,
- uint16_t *value)
+ uint16_t *value)
{
npi_status_t rs = NPI_SUCCESS;
@@ -5482,7 +5482,7 @@ fail:
nxge_status_t
nxge_mii_write(p_nxge_t nxgep, uint8_t xcvr_portn, uint8_t xcvr_reg,
- uint16_t value)
+ uint16_t value)
{
npi_status_t rs = NPI_SUCCESS;
@@ -5521,10 +5521,10 @@ fail:
/*
* Perform write to Clause45 serdes / transceiver device
* Arguments:
- * xcvr_portn: The IEEE 802.3 Clause45 PHYAD, it is the same as port
+ * xcvr_portn: The IEEE 802.3 Clause45 PHYAD, it is the same as port
* number if nxge_mdio_write is used for accessing the
* internal LSIL serdes. Otherwise PHYAD is different
- * for different platforms.
+ * for different platforms.
* device: With each PHYAD, the driver can use MDIO to control
* multiple devices inside the PHY, here "device" is an
* MMD (MDIO managable device).
@@ -5534,7 +5534,7 @@ fail:
*/
nxge_status_t
nxge_mdio_read(p_nxge_t nxgep, uint8_t xcvr_portn, uint8_t device,
- uint16_t xcvr_reg, uint16_t *value)
+ uint16_t xcvr_reg, uint16_t *value)
{
npi_status_t rs = NPI_SUCCESS;
@@ -5565,7 +5565,7 @@ fail:
nxge_status_t
nxge_mdio_write(p_nxge_t nxgep, uint8_t xcvr_portn, uint8_t device,
- uint16_t xcvr_reg, uint16_t value)
+ uint16_t xcvr_reg, uint16_t value)
{
npi_status_t rs = NPI_SUCCESS;
@@ -5597,7 +5597,7 @@ fail:
nxge_status_t
nxge_mii_check(p_nxge_t nxgep, mii_bmsr_t bmsr, mii_bmsr_t bmsr_ints,
- nxge_link_state_t *link_up)
+ nxge_link_state_t *link_up)
{
p_nxge_param_t param_arr;
p_nxge_stats_t statsp;
@@ -6679,8 +6679,8 @@ nxge_link_monitor(p_nxge_t nxgep, link_mon_enable_t enable)
* argument to the check_link function.
*/
if (nxgep->xcvr.check_link) {
- timerid = timeout(
- (fptrv_t)(nxgep->xcvr.check_link),
+ timerid = timeout((fptrv_t)(uintptr_t)
+ (nxgep->xcvr.check_link),
nxgep,
drv_usectohz(LINK_MONITOR_PERIOD));
MUTEX_ENTER(&nxgep->poll_lock);
@@ -8105,7 +8105,7 @@ nxge_scan_ports_phy(p_nxge_t nxgep, p_nxge_hw_list_t hw_p)
goto error_exit;
}
break;
- case 1: /* Only one clause45 port */
+ case 1: /* Only one clause45 port */
switch (total_phy_fd) { /* Number of clause22 ports */
case 3:
/*
@@ -8465,7 +8465,8 @@ nxge_is_valid_local_mac(ether_addr_st mac_addr)
}
static void
-nxge_bcm5464_link_led_off(p_nxge_t nxgep) {
+nxge_bcm5464_link_led_off(p_nxge_t nxgep)
+{
npi_status_t rs = NPI_SUCCESS;
uint8_t xcvr_portn;
@@ -8635,7 +8636,7 @@ nxge_get_num_of_xaui(uint32_t *port_pma_pmd_dev_id,
*num_xaui = 0;
if ((port_pma_pmd_dev_id[0] == PHY_BCM8704_FAMILY &&
- port_pcs_dev_id[0] == PHY_BCM8704_FAMILY) ||
+ port_pcs_dev_id[0] == PHY_BCM8704_FAMILY) ||
(((port_pma_pmd_dev_id[0] & TN1010_DEV_ID_MASK)
== TN1010_DEV_ID) &&
((port_pcs_dev_id[0] & TN1010_DEV_ID_MASK)
@@ -8748,8 +8749,8 @@ fail:
* Teranetics TN1010 PHY chip supports both 1G and 10G modes, this function
* figures out the speed of the PHY determined by the autonegotiation
* process and sets the following 3 parameters,
- * nxgep->mac.portmode
- * nxgep->statsp->mac_stats.link_speed
+ * nxgep->mac.portmode
+ * nxgep->statsp->mac_stats.link_speed
* nxgep->statsp->mac_stats.xcvr_inuse
*/
static nxge_status_t
diff --git a/usr/src/uts/common/io/ptm.c b/usr/src/uts/common/io/ptm.c
index dc6c4e64ad..54bcee88bc 100644
--- a/usr/src/uts/common/io/ptm.c
+++ b/usr/src/uts/common/io/ptm.c
@@ -22,7 +22,7 @@
* Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
@@ -146,9 +146,9 @@ int ptm_debug = 0;
static int ptmopen(queue_t *, dev_t *, int, int, cred_t *);
static int ptmclose(queue_t *, int, cred_t *);
-static void ptmwput(queue_t *, mblk_t *);
-static void ptmrsrv(queue_t *);
-static void ptmwsrv(queue_t *);
+static int ptmwput(queue_t *, mblk_t *);
+static int ptmrsrv(queue_t *);
+static int ptmwsrv(queue_t *);
/*
* Master Stream Pseudo Terminal Module: stream data structure definitions
@@ -165,7 +165,7 @@ static struct module_info ptm_info = {
static struct qinit ptmrint = {
NULL,
- (int (*)()) ptmrsrv,
+ ptmrsrv,
ptmopen,
ptmclose,
NULL,
@@ -174,8 +174,8 @@ static struct qinit ptmrint = {
};
static struct qinit ptmwint = {
- (int (*)()) ptmwput,
- (int (*)()) ptmwsrv,
+ ptmwput,
+ ptmwsrv,
NULL,
NULL,
NULL,
@@ -462,7 +462,7 @@ ptmptsopencb(ptmptsopencb_arg_t arg)
/*
* The wput procedure will only handle ioctl and flush messages.
*/
-static void
+static int
ptmwput(queue_t *qp, mblk_t *mp)
{
struct pt_ttys *ptmp;
@@ -520,7 +520,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
DBG(("got M_IOCTL but no slave\n"));
miocnak(qp, mp, 0, EINVAL);
PT_EXIT_READ(ptmp);
- return;
+ return (0);
}
(void) putq(qp, mp);
break;
@@ -642,7 +642,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
qreply(qp, mp);
}
PT_EXIT_READ(ptmp);
- return;
+ return (0);
}
DBG(("put msg on master's write queue\n"));
(void) putq(qp, mp);
@@ -650,6 +650,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
}
DBG(("return from ptmwput()\n"));
PT_EXIT_READ(ptmp);
+ return (0);
}
@@ -658,7 +659,7 @@ ptmwput(queue_t *qp, mblk_t *mp)
* slave to send any messages queued on its write side to
* the read side of this master.
*/
-static void
+static int
ptmrsrv(queue_t *qp)
{
struct pt_ttys *ptmp;
@@ -673,6 +674,7 @@ ptmrsrv(queue_t *qp)
}
PT_EXIT_READ(ptmp);
DBG(("leaving ptmrsrv\n"));
+ return (0);
}
@@ -682,11 +684,11 @@ ptmrsrv(queue_t *qp)
* cannot be sent, leave them on this queue. If priority
* messages on this queue, send them to slave no matter what.
*/
-static void
+static int
ptmwsrv(queue_t *qp)
{
struct pt_ttys *ptmp;
- mblk_t *mp;
+ mblk_t *mp;
DBG(("entering ptmwsrv\n"));
ASSERT(qp->q_ptr);
@@ -696,7 +698,7 @@ ptmwsrv(queue_t *qp)
if ((mp = getq(qp)) == NULL) {
/* If there are no messages there's nothing to do. */
DBG(("leaving ptmwsrv (no messages)\n"));
- return;
+ return (0);
}
PT_ENTER_READ(ptmp);
@@ -723,7 +725,7 @@ ptmwsrv(queue_t *qp)
qreply(qp, mp);
}
PT_EXIT_READ(ptmp);
- return;
+ return (0);
}
/*
* while there are messages on this write queue...
@@ -748,4 +750,5 @@ ptmwsrv(queue_t *qp)
} while ((mp = getq(qp)) != NULL);
DBG(("leaving ptmwsrv\n"));
PT_EXIT_READ(ptmp);
+ return (0);
}
diff --git a/usr/src/uts/common/io/pts.c b/usr/src/uts/common/io/pts.c
index 1bcdc2bcef..d67beb255a 100644
--- a/usr/src/uts/common/io/pts.c
+++ b/usr/src/uts/common/io/pts.c
@@ -23,7 +23,7 @@
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
@@ -128,9 +128,9 @@ int pts_debug = 0;
static int ptsopen(queue_t *, dev_t *, int, int, cred_t *);
static int ptsclose(queue_t *, int, cred_t *);
-static void ptswput(queue_t *, mblk_t *);
-static void ptsrsrv(queue_t *);
-static void ptswsrv(queue_t *);
+static int ptswput(queue_t *, mblk_t *);
+static int ptsrsrv(queue_t *);
+static int ptswsrv(queue_t *);
/*
* Slave Stream Pseudo Terminal Module: stream data structure definitions
@@ -146,7 +146,7 @@ static struct module_info pts_info = {
static struct qinit ptsrint = {
NULL,
- (int (*)()) ptsrsrv,
+ ptsrsrv,
ptsopen,
ptsclose,
NULL,
@@ -155,8 +155,8 @@ static struct qinit ptsrint = {
};
static struct qinit ptswint = {
- (int (*)()) ptswput,
- (int (*)()) ptswsrv,
+ ptswput,
+ ptswsrv,
NULL,
NULL,
NULL,
@@ -504,7 +504,7 @@ ptsclose(queue_t *rqp, int flag, cred_t *credp)
* All other messages are queued and the write side
* service procedure sends them off to the master side.
*/
-static void
+static int
ptswput(queue_t *qp, mblk_t *mp)
{
struct pt_ttys *ptsp;
@@ -530,7 +530,7 @@ ptswput(queue_t *qp, mblk_t *mp)
} else
freemsg(mp);
PT_EXIT_READ(ptsp);
- return;
+ return (0);
}
if (type >= QPCTL) {
@@ -606,7 +606,7 @@ ptswput(queue_t *qp, mblk_t *mp)
break;
}
PT_EXIT_READ(ptsp);
- return;
+ return (0);
}
switch (type) {
@@ -637,9 +637,9 @@ ptswput(queue_t *qp, mblk_t *mp)
iocp->ioc_count = 0;
qreply(qp, mp);
PT_EXIT_READ(ptsp);
- return;
+ return (0);
}
-
+ /* FALLTHROUGH */
default:
/*
* send other messages to the master
@@ -651,6 +651,7 @@ ptswput(queue_t *qp, mblk_t *mp)
PT_EXIT_READ(ptsp);
DBG(("return from ptswput()\n"));
+ return (0);
}
@@ -659,7 +660,7 @@ ptswput(queue_t *qp, mblk_t *mp)
* master to send any messages queued on its write side to
* the read side of this slave.
*/
-static void
+static int
ptsrsrv(queue_t *qp)
{
struct pt_ttys *ptsp;
@@ -672,11 +673,12 @@ ptsrsrv(queue_t *qp)
if (ptsp->ptm_rdq == NULL) {
DBG(("in read srv proc but no master\n"));
PT_EXIT_READ(ptsp);
- return;
+ return (0);
}
qenable(WR(ptsp->ptm_rdq));
PT_EXIT_READ(ptsp);
DBG(("leaving ptsrsrv\n"));
+ return (0);
}
/*
@@ -685,7 +687,7 @@ ptsrsrv(queue_t *qp)
* cannot be sent, leave them on this queue. If priority
* messages on this queue, send them to master no matter what.
*/
-static void
+static int
ptswsrv(queue_t *qp)
{
struct pt_ttys *ptsp;
@@ -715,7 +717,7 @@ ptswsrv(queue_t *qp)
freemsg(mp);
}
PT_EXIT_READ(ptsp);
- return;
+ return (0);
} else {
ptm_rdq = ptsp->ptm_rdq;
}
@@ -743,4 +745,5 @@ ptswsrv(queue_t *qp)
}
DBG(("leaving ptswsrv\n"));
PT_EXIT_READ(ptsp);
+ return (0);
}
diff --git a/usr/src/uts/common/io/tty_pts.c b/usr/src/uts/common/io/tty_pts.c
index 1ea7fed353..57f7a22978 100644
--- a/usr/src/uts/common/io/tty_pts.c
+++ b/usr/src/uts/common/io/tty_pts.c
@@ -76,7 +76,7 @@ static int ptslrserv(queue_t *);
* from this function, it is defined as void here. Kind of icky, but...
*/
-static void ptslwput(queue_t *q, mblk_t *mp);
+static int ptslwput(queue_t *q, mblk_t *mp);
static struct module_info ptslm_info = {
0,
@@ -98,7 +98,7 @@ static struct qinit ptslrinit = {
};
static struct qinit ptslwinit = {
- (int (*)())ptslwput,
+ ptslwput,
NULL,
NULL,
NULL,
@@ -384,7 +384,7 @@ ptslclose(queue_t *q, int flag, cred_t *cred)
* queue up M_DATA messages for processing by the controller "read"
* routine; discard everything else.
*/
-static void
+static int
ptslwput(queue_t *q, mblk_t *mp)
{
struct pty *pty;
@@ -449,7 +449,7 @@ ptslwput(queue_t *q, mblk_t *mp)
flushq(RD(q), FLUSHDATA);
mutex_exit(&pty->ptc_lock);
qreply(q, mp); /* give the read queues a crack at it */
- return;
+ return (0);
} else
freemsg(mp);
break;
@@ -466,7 +466,8 @@ ptslwput(queue_t *q, mblk_t *mp)
freeb(bp);
if (mp == NULL) {
mutex_exit(&pty->ptc_lock);
- return; /* damp squib of a message */
+ /* damp squib of a message */
+ return (0);
}
bp = mp;
}
@@ -499,6 +500,7 @@ ptslwput(queue_t *q, mblk_t *mp)
break;
}
mutex_exit(&pty->ptc_lock);
+ return (0);
}
/*
diff --git a/usr/src/uts/common/sys/ieeefp.h b/usr/src/uts/common/sys/ieeefp.h
index 9b47e6ce47..2ee4ec4d51 100644
--- a/usr/src/uts/common/sys/ieeefp.h
+++ b/usr/src/uts/common/sys/ieeefp.h
@@ -27,8 +27,6 @@
#ifndef _SYS_IEEEFP_H
#define _SYS_IEEEFP_H
-#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.0 1.6 */
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -60,6 +58,7 @@ enum fp_exception_type { /* exceptions according to bit number */
fp_overflow = 3,
fp_invalid = 4
};
+#define N_IEEE_EXCEPTION 5 /* Number of floating-point exceptions. */
enum fp_trap_enable_type { /* trap enable bits according to bit number */
fp_trap_inexact = 0,
@@ -93,6 +92,7 @@ enum fp_exception_type { /* exceptions according to bit number */
fp_underflow = 4,
fp_inexact = 5
};
+#define N_IEEE_EXCEPTION 6 /* Number of floating-point exceptions. */
enum fp_trap_enable_type { /* trap enable bits according to bit number */
fp_trap_invalid = 0,
@@ -109,7 +109,7 @@ enum fp_class_type { /* floating-point classes */
fp_zero = 0,
fp_subnormal = 1,
fp_normal = 2,
- fp_infinity = 3,
+ fp_infinity = 3,
fp_quiet = 4,
fp_signaling = 5
};