summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/io')
-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
6 files changed, 75 insertions, 62 deletions
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);
}
/*