summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2013-11-15 16:46:27 +0000
committerbrad <brad@openbsd.org>2013-11-15 16:46:27 +0000
commitab2e89348ab50f255b493f49df159b731b7310b6 (patch)
tree166cb05a1be032cdceff3f08822ae51973924001
parentRename the struct pf_divert variable in divert_packet() and (diff)
downloadwireguard-openbsd-ab2e89348ab50f255b493f49df159b731b7310b6.tar.xz
wireguard-openbsd-ab2e89348ab50f255b493f49df159b731b7310b6.zip
ansify some function definitions.
no functional change. ok sthen@
-rw-r--r--sys/dev/ic/advlib.c520
-rw-r--r--sys/dev/isa/ess.c240
-rw-r--r--sys/dev/isa/ess_isapnp.c10
-rw-r--r--sys/dev/isa/gus.c285
-rw-r--r--sys/dev/isa/if_eg.c70
-rw-r--r--sys/dev/isa/if_ep_isa.c15
-rw-r--r--sys/dev/isa/if_ep_isapnp.c10
-rw-r--r--sys/dev/isa/isapnpres.c30
-rw-r--r--sys/dev/isa/wds.c107
-rw-r--r--sys/dev/pci/autri.c191
-rw-r--r--sys/dev/pci/fms.c117
-rw-r--r--sys/dev/pci/maestro.c168
-rw-r--r--sys/dev/pci/neo.c117
-rw-r--r--sys/dev/pci/sv.c136
14 files changed, 518 insertions, 1498 deletions
diff --git a/sys/dev/ic/advlib.c b/sys/dev/ic/advlib.c
index 8b4f398e0f3..2984cbdfc5b 100644
--- a/sys/dev/ic/advlib.c
+++ b/sys/dev/ic/advlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: advlib.c,v 1.13 2008/06/26 05:42:15 ray Exp $ */
+/* $OpenBSD: advlib.c,v 1.14 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: advlib.c,v 1.7 1998/10/28 20:39:46 dante Exp $ */
/*
@@ -243,15 +243,13 @@ static void DvcDelayNanoSecond(u_int32_t);
* - keep track of bugged borads.
*/
void
-AscInitASC_SOFTC(sc)
- ASC_SOFTC *sc;
+AscInitASC_SOFTC(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
int i;
u_int8_t chip_version;
-
ASC_SET_CHIP_CONTROL(iot, ioh, ASC_CC_HALT);
ASC_SET_CHIP_STATUS(iot, ioh, 0);
@@ -343,8 +341,7 @@ AscInitASC_SOFTC(sc)
* on-board EEProm.
*/
u_int16_t
-AscInitFromEEP(sc)
- ASC_SOFTC *sc;
+AscInitFromEEP(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -356,7 +353,6 @@ AscInitFromEEP(sc)
int i;
int write_eep = 0;
-
warn_code = 0;
AscWriteLramWord(iot, ioh, ASCV_HALTCODE_W, 0x00FE);
AscStopQueueExe(iot, ioh);
@@ -513,8 +509,7 @@ AscInitFromEEP(sc)
u_int16_t
-AscInitFromASC_SOFTC(sc)
- ASC_SOFTC *sc;
+AscInitFromASC_SOFTC(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -522,7 +517,6 @@ AscInitFromASC_SOFTC(sc)
u_int16_t warn_code;
u_int16_t pci_device_id = sc->pci_device_id;
-
warn_code = 0;
cfg_msw = ASC_GET_CHIP_CFG_MSW(iot, ioh);
@@ -575,14 +569,12 @@ AscInitFromASC_SOFTC(sc)
* - Enable Interrupts
*/
int
-AscInitDriver(sc)
- ASC_SOFTC *sc;
+AscInitDriver(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
u_int32_t chksum;
-
if (!AscFindSignature(iot, ioh))
return (1);
@@ -604,9 +596,7 @@ AscInitDriver(sc)
int
-AscFindSignature(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscFindSignature(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int16_t sig_word;
@@ -621,15 +611,13 @@ AscFindSignature(iot, ioh)
static void
-AscInitLram(sc)
- ASC_SOFTC *sc;
+AscInitLram(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
u_int8_t i;
u_int16_t s_addr;
-
AscMemWordSetLram(iot, ioh, ASC_QADR_BEG, 0,
(((sc->max_total_qng + 2 + 1) * 64) >> 1));
@@ -659,25 +647,21 @@ AscInitLram(sc)
void
-AscReInitLram(sc)
- ASC_SOFTC *sc;
+AscReInitLram(ASC_SOFTC *sc)
{
-
AscInitLram(sc);
AscInitQLinkVar(sc);
}
static void
-AscInitQLinkVar(sc)
- ASC_SOFTC *sc;
+AscInitQLinkVar(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
u_int8_t i;
u_int16_t lram_addr;
-
ASC_PUT_RISC_VAR_FREE_QHEAD(iot, ioh, 1);
ASC_PUT_RISC_VAR_DONE_QTAIL(iot, ioh, sc->max_total_qng);
ASC_PUT_VAR_FREE_QHEAD(iot, ioh, 1);
@@ -698,8 +682,7 @@ AscInitQLinkVar(sc)
static int
-AscResetChipAndScsiBus(bus_space_tag_t iot,
- bus_space_handle_t ioh)
+AscResetChipAndScsiBus(bus_space_tag_t iot, bus_space_handle_t ioh)
{
while (ASC_GET_CHIP_STATUS(iot, ioh) & ASC_CSW_SCSI_RESET_ACTIVE);
@@ -725,9 +708,7 @@ AscResetChipAndScsiBus(bus_space_tag_t iot,
static u_int16_t
-AscGetChipBusType(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscGetChipBusType(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int16_t chip_ver;
@@ -760,10 +741,7 @@ AscGetChipBusType(iot, ioh)
static void
-AscSetBank(iot, ioh, bank)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t bank;
+AscSetBank(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t bank)
{
u_int8_t val;
@@ -796,9 +774,7 @@ AscSetBank(iot, ioh, bank)
static int
-AscStartChip(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscStartChip(bus_space_tag_t iot, bus_space_handle_t ioh)
{
ASC_SET_CHIP_CONTROL(iot, ioh, 0);
if ((ASC_GET_CHIP_STATUS(iot, ioh) & ASC_CSW_HALTED) != 0)
@@ -809,9 +785,7 @@ AscStartChip(iot, ioh)
static int
-AscStopChip(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscStopChip(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int8_t cc_val;
@@ -828,10 +802,8 @@ AscStopChip(iot, ioh)
static u_int8_t
-AscGetChipVersion(iot, ioh, bus_type)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t bus_type;
+AscGetChipVersion(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int16_t bus_type)
{
if (bus_type & ASC_IS_EISA) {
/*
@@ -847,10 +819,7 @@ AscGetChipVersion(iot, ioh, bus_type)
static u_int8_t
-AscSetChipScsiID(iot, ioh, new_id)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t new_id;
+AscSetChipScsiID(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t new_id)
{
u_int16_t cfg_lsw;
@@ -866,9 +835,7 @@ AscSetChipScsiID(iot, ioh, new_id)
static u_int8_t
-AscGetChipScsiCtrl(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscGetChipScsiCtrl(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int8_t scsi_ctrl;
@@ -880,11 +847,8 @@ AscGetChipScsiCtrl(iot, ioh)
static int
-AscSetRunChipSynRegAtID(iot, ioh, tid_no, sdtr_data)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t tid_no;
- u_int8_t sdtr_data;
+AscSetRunChipSynRegAtID(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int8_t tid_no, u_int8_t sdtr_data)
{
int retval = FALSE;
@@ -897,11 +861,8 @@ AscSetRunChipSynRegAtID(iot, ioh, tid_no, sdtr_data)
static int
-AscSetChipSynRegAtID(iot, ioh, id, sdtr_data)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t id;
- u_int8_t sdtr_data;
+AscSetChipSynRegAtID(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t id,
+ u_int8_t sdtr_data)
{
ASC_SCSI_BIT_ID_TYPE org_id;
int i;
@@ -931,15 +892,12 @@ AscSetChipSynRegAtID(iot, ioh, id, sdtr_data)
static int
-AscHostReqRiscHalt(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscHostReqRiscHalt(bus_space_tag_t iot, bus_space_handle_t ioh)
{
int count = 0;
int retval = 0;
u_int8_t saved_stop_code;
-
if (AscIsChipHalted(iot, ioh))
return (1);
saved_stop_code = AscReadLramByte(iot, ioh, ASCV_STOP_CODE_B);
@@ -961,9 +919,7 @@ AscHostReqRiscHalt(iot, ioh)
static int
-AscIsChipHalted(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscIsChipHalted(bus_space_tag_t iot, bus_space_handle_t ioh)
{
if ((ASC_GET_CHIP_STATUS(iot, ioh) & ASC_CSW_HALTED) != 0)
if ((ASC_GET_CHIP_CONTROL(iot, ioh) & ASC_CC_HALT) != 0)
@@ -974,10 +930,7 @@ AscIsChipHalted(iot, ioh)
static void
-AscSetChipIH(iot, ioh, ins_code)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t ins_code;
+AscSetChipIH(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t ins_code)
{
AscSetBank(iot, ioh, 1);
ASC_WRITE_CHIP_IH(iot, ioh, ins_code);
@@ -993,15 +946,11 @@ AscSetChipIH(iot, ioh, ins_code)
static u_int8_t
-AscReadLramByte(iot, ioh, addr)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
+AscReadLramByte(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr)
{
u_int8_t byte_data;
u_int16_t word_data;
-
ASC_SET_CHIP_LRAM_ADDR(iot, ioh, addr & 0xFFFE);
word_data = ASC_GET_CHIP_LRAM_DATA(iot, ioh);
@@ -1018,15 +967,11 @@ AscReadLramByte(iot, ioh, addr)
static void
-AscWriteLramByte(iot, ioh, addr, data)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
- u_int8_t data;
+AscWriteLramByte(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr,
+ u_int8_t data)
{
u_int16_t word_data;
-
word_data = AscReadLramWord(iot, ioh, addr & 0xFFFE);
if (addr & 1) {
@@ -1044,39 +989,27 @@ AscWriteLramByte(iot, ioh, addr, data)
static u_int16_t
-AscReadLramWord(iot, ioh, addr)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
+AscReadLramWord(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr)
{
-
ASC_SET_CHIP_LRAM_ADDR(iot, ioh, addr);
return (ASC_GET_CHIP_LRAM_DATA(iot, ioh));
}
static void
-AscWriteLramWord(iot, ioh, addr, data)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
- u_int16_t data;
+AscWriteLramWord(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr,
+ u_int16_t data)
{
-
ASC_SET_CHIP_LRAM_ADDR(iot, ioh, addr);
ASC_SET_CHIP_LRAM_DATA(iot, ioh, data);
}
static u_int32_t
-AscReadLramDWord(iot, ioh, addr)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
+AscReadLramDWord(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr)
{
u_int16_t low_word, hi_word;
-
ASC_SET_CHIP_LRAM_ADDR(iot, ioh, addr);
low_word = ASC_GET_CHIP_LRAM_DATA(iot, ioh);
hi_word = ASC_GET_CHIP_LRAM_DATA(iot, ioh);
@@ -1086,13 +1019,9 @@ AscReadLramDWord(iot, ioh, addr)
static void
-AscWriteLramDWord(iot, ioh, addr, data)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
- u_int32_t data;
+AscWriteLramDWord(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr,
+ u_int32_t data)
{
-
ASC_SET_CHIP_LRAM_ADDR(iot, ioh, addr);
ASC_SET_CHIP_LRAM_DATA(iot, ioh, (u_int16_t) (data & 0x0000FFFF));
ASC_SET_CHIP_LRAM_DATA(iot, ioh, (u_int16_t) (data >> 16));
@@ -1100,12 +1029,8 @@ AscWriteLramDWord(iot, ioh, addr, data)
static void
-AscMemWordSetLram(iot, ioh, s_addr, s_words, count)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t s_addr;
- u_int16_t s_words;
- int count;
+AscMemWordSetLram(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t s_addr,
+ u_int16_t s_words, int count)
{
int i;
@@ -1116,12 +1041,8 @@ AscMemWordSetLram(iot, ioh, s_addr, s_words, count)
static void
-AscMemWordCopyToLram(iot, ioh, s_addr, s_buffer, words)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t s_addr;
- u_int16_t *s_buffer;
- int words;
+AscMemWordCopyToLram(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int16_t s_addr, u_int16_t *s_buffer, int words)
{
int i;
@@ -1132,12 +1053,8 @@ AscMemWordCopyToLram(iot, ioh, s_addr, s_buffer, words)
static void
-AscMemWordCopyFromLram(iot, ioh, s_addr, s_buffer, words)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t s_addr;
- u_int16_t *s_buffer;
- int words;
+AscMemWordCopyFromLram(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int16_t s_addr, u_int16_t *s_buffer, int words)
{
int i;
@@ -1148,12 +1065,8 @@ AscMemWordCopyFromLram(iot, ioh, s_addr, s_buffer, words)
static void
-AscMemDWordCopyToLram(iot, ioh, s_addr, s_buffer, dwords)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t s_addr;
- u_int32_t *s_buffer;
- int dwords;
+AscMemDWordCopyToLram(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int16_t s_addr, u_int32_t *s_buffer, int dwords)
{
int i;
u_int32_t *pw;
@@ -1170,16 +1083,12 @@ AscMemDWordCopyToLram(iot, ioh, s_addr, s_buffer, dwords)
static u_int32_t
-AscMemSumLramWord(iot, ioh, s_addr, words)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t s_addr;
- int words;
+AscMemSumLramWord(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t s_addr,
+ int words)
{
u_int32_t sum = 0L;
u_int16_t i;
-
for (i = 0; i < words; i++, s_addr += 2)
sum += AscReadLramWord(iot, ioh, s_addr);
@@ -1188,15 +1097,12 @@ AscMemSumLramWord(iot, ioh, s_addr, words)
static int
-AscTestExternalLram(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscTestExternalLram(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int16_t q_addr;
u_int16_t saved_word;
int retval;
-
retval = 0;
q_addr = ASC_QNO_TO_QADDR(241);
saved_word = AscReadLramWord(iot, ioh, q_addr);
@@ -1219,15 +1125,13 @@ AscTestExternalLram(iot, ioh)
static u_int16_t
-AscInitMicroCodeVar(sc)
- ASC_SOFTC *sc;
+AscInitMicroCodeVar(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
u_int32_t phy_addr;
int i;
-
for (i = 0; i <= ASC_MAX_TID; i++)
ASC_PUT_MCODE_INIT_SDTR_AT_ID(iot, ioh, i,
sc->sdtr_period_offset[i]);
@@ -1262,12 +1166,8 @@ AscInitMicroCodeVar(sc)
static u_int32_t
-AscLoadMicroCode(iot, ioh, s_addr, mcode_buf, mcode_size)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t s_addr;
- u_int16_t *mcode_buf;
- u_int16_t mcode_size;
+AscLoadMicroCode(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t s_addr,
+ u_int16_t *mcode_buf, u_int16_t mcode_size)
{
u_int32_t chksum;
u_int16_t mcode_word_size;
@@ -1289,10 +1189,7 @@ AscLoadMicroCode(iot, ioh, s_addr, mcode_buf, mcode_size)
static u_int32_t
-AscGetOnePhyAddr(sc, buf_addr, buf_size)
- ASC_SOFTC *sc;
- u_int8_t *buf_addr;
- u_int32_t buf_size;
+AscGetOnePhyAddr(ASC_SOFTC *sc, u_int8_t *buf_addr, u_int32_t buf_size)
{
ASC_MIN_SG_HEAD sg_head;
@@ -1309,11 +1206,8 @@ AscGetOnePhyAddr(sc, buf_addr, buf_size)
static u_int32_t
-AscGetSGList(sc, buf_addr, buf_len, asc_sg_head_ptr)
- ASC_SOFTC *sc;
- u_int8_t *buf_addr;
- u_int32_t buf_len;
- ASC_SG_HEAD *asc_sg_head_ptr;
+AscGetSGList(ASC_SOFTC *sc, u_int8_t *buf_addr, u_int32_t buf_len,
+ ASC_SG_HEAD *asc_sg_head_ptr)
{
u_int32_t buf_size;
@@ -1332,10 +1226,7 @@ AscGetSGList(sc, buf_addr, buf_len, asc_sg_head_ptr)
static int
-AscWriteEEPCmdReg(iot, ioh, cmd_reg)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t cmd_reg;
+AscWriteEEPCmdReg(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t cmd_reg)
{
u_int8_t read_back;
int retry;
@@ -1356,10 +1247,8 @@ AscWriteEEPCmdReg(iot, ioh, cmd_reg)
static int
-AscWriteEEPDataReg(iot, ioh, data_reg)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t data_reg;
+AscWriteEEPDataReg(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int16_t data_reg)
{
u_int16_t read_back;
int retry;
@@ -1381,7 +1270,6 @@ AscWriteEEPDataReg(iot, ioh, data_reg)
static void
AscWaitEEPRead(void)
{
-
DvcSleepMilliSecond(1);
}
@@ -1389,16 +1277,12 @@ AscWaitEEPRead(void)
static void
AscWaitEEPWrite(void)
{
-
DvcSleepMilliSecond(1);
}
static u_int16_t
-AscReadEEPWord(iot, ioh, addr)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t addr;
+AscReadEEPWord(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t addr)
{
u_int16_t read_wval;
u_int8_t cmd_reg;
@@ -1416,11 +1300,8 @@ AscReadEEPWord(iot, ioh, addr)
static u_int16_t
-AscWriteEEPWord(iot, ioh, addr, word_val)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t addr;
- u_int16_t word_val;
+AscWriteEEPWord(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t addr,
+ u_int16_t word_val)
{
u_int16_t read_wval;
@@ -1441,11 +1322,8 @@ AscWriteEEPWord(iot, ioh, addr, word_val)
static u_int16_t
-AscGetEEPConfig(iot, ioh, cfg_buf, bus_type)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- ASCEEP_CONFIG *cfg_buf;
- u_int16_t bus_type;
+AscGetEEPConfig(bus_space_tag_t iot, bus_space_handle_t ioh,
+ ASCEEP_CONFIG *cfg_buf, u_int16_t bus_type)
{
u_int16_t wval;
u_int16_t sum;
@@ -1455,7 +1333,6 @@ AscGetEEPConfig(iot, ioh, cfg_buf, bus_type)
int s_addr;
int isa_pnp_wsize;
-
wbuf = (u_int16_t *) cfg_buf;
sum = 0;
isa_pnp_wsize = 0;
@@ -1487,11 +1364,8 @@ AscGetEEPConfig(iot, ioh, cfg_buf, bus_type)
static int
-AscSetEEPConfig(iot, ioh, cfg_buf, bus_type)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- ASCEEP_CONFIG *cfg_buf;
- u_int16_t bus_type;
+AscSetEEPConfig(bus_space_tag_t iot, bus_space_handle_t ioh,
+ ASCEEP_CONFIG *cfg_buf, u_int16_t bus_type)
{
int retry;
int n_error;
@@ -1510,11 +1384,8 @@ AscSetEEPConfig(iot, ioh, cfg_buf, bus_type)
static int
-AscSetEEPConfigOnce(iot, ioh, cfg_buf, bus_type)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- ASCEEP_CONFIG *cfg_buf;
- u_int16_t bus_type;
+AscSetEEPConfigOnce(bus_space_tag_t iot, bus_space_handle_t ioh,
+ ASCEEP_CONFIG *cfg_buf, u_int16_t bus_type)
{
int n_error;
u_int16_t *wbuf;
@@ -1568,9 +1439,7 @@ AscSetEEPConfigOnce(iot, ioh, cfg_buf, bus_type)
#ifdef ASC_DEBUG
static void
-AscPrintEEPConfig(eep_config, chksum)
- ASCEEP_CONFIG *eep_config;
- u_int16_t chksum;
+AscPrintEEPConfig(ASCEEP_CONFIG *eep_config, u_int16_t chksum)
{
printf("---- ASC EEprom settings ----\n");
printf("cfg_lsw = 0x%x\n", eep_config->cfg_lsw);
@@ -1615,8 +1484,7 @@ AscPrintEEPConfig(eep_config, chksum)
int
-AscISR(sc)
- ASC_SOFTC *sc;
+AscISR(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -1628,7 +1496,6 @@ AscISR(sc)
int status;
u_int8_t host_flag;
-
int_pending = FALSE;
ctrl_reg = ASC_GET_CHIP_CONTROL(iot, ioh);
@@ -1688,8 +1555,7 @@ AscISR(sc)
static int
-AscIsrQDone(sc)
- ASC_SOFTC *sc;
+AscIsrQDone(ASC_SOFTC *sc)
{
u_int8_t next_qp;
u_int8_t n_q_used;
@@ -1709,7 +1575,6 @@ AscIsrQDone(sc)
ASC_QDONE_INFO *scsiq;
ASC_ISR_CALLBACK asc_isr_callback;
-
asc_isr_callback = (ASC_ISR_CALLBACK) sc->isr_callback;
n_q_used = 1;
scsiq = (ASC_QDONE_INFO *) & scsiq_buf;
@@ -1807,8 +1672,7 @@ AscIsrQDone(sc)
* waiting us to intervene
*/
static void
-AscIsrChipHalted(sc)
- ASC_SOFTC *sc;
+AscIsrChipHalted(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -1828,7 +1692,6 @@ AscIsrChipHalted(sc)
ASC_SCSI_BIT_ID_TYPE scsi_busy;
ASC_SCSI_BIT_ID_TYPE target_id;
-
int_halt_code = AscReadLramWord(iot, ioh, ASCV_HALTCODE_W);
halt_qp = AscReadLramByte(iot, ioh, ASCV_CURCDB_B);
@@ -1944,9 +1807,7 @@ AscIsrChipHalted(sc)
static int
-AscWaitTixISRDone(sc, target_ix)
- ASC_SOFTC *sc;
- u_int8_t target_ix;
+AscWaitTixISRDone(ASC_SOFTC *sc, u_int8_t target_ix)
{
u_int8_t cur_req;
u_int8_t tid_no;
@@ -1965,8 +1826,7 @@ AscWaitTixISRDone(sc, target_ix)
}
static int
-AscWaitISRDone(sc)
- ASC_SOFTC *sc;
+AscWaitISRDone(ASC_SOFTC *sc)
{
int tid;
@@ -1978,12 +1838,8 @@ AscWaitISRDone(sc)
static u_int8_t
-_AscCopyLramScsiDoneQ(iot, ioh, q_addr, scsiq, max_dma_count)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t q_addr;
- ASC_QDONE_INFO *scsiq;
- u_int32_t max_dma_count;
+_AscCopyLramScsiDoneQ(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int16_t q_addr, ASC_QDONE_INFO *scsiq, u_int32_t max_dma_count)
{
u_int16_t _val;
u_int8_t sg_queue_cnt;
@@ -2008,11 +1864,8 @@ _AscCopyLramScsiDoneQ(iot, ioh, q_addr, scsiq, max_dma_count)
static void
-AscGetQDoneInfo(iot, ioh, addr, scsiq)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
- ASC_QDONE_INFO *scsiq;
+AscGetQDoneInfo(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr,
+ ASC_QDONE_INFO *scsiq)
{
u_int16_t val;
@@ -2038,20 +1891,15 @@ AscGetQDoneInfo(iot, ioh, addr, scsiq)
static void
-AscToggleIRQAct(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscToggleIRQAct(bus_space_tag_t iot, bus_space_handle_t ioh)
{
-
ASC_SET_CHIP_STATUS(iot, ioh, ASC_CIW_IRQ_ACT);
ASC_SET_CHIP_STATUS(iot, ioh, 0);
}
static void
-AscDisableInterrupt(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscDisableInterrupt(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int16_t cfg;
@@ -2061,9 +1909,7 @@ AscDisableInterrupt(iot, ioh)
static void
-AscEnableInterrupt(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscEnableInterrupt(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int16_t cfg;
@@ -2073,15 +1919,11 @@ AscEnableInterrupt(iot, ioh)
static u_int8_t
-AscGetChipIRQ(iot, ioh, bus_type)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t bus_type;
+AscGetChipIRQ(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t bus_type)
{
u_int16_t cfg_lsw;
u_int8_t chip_irq;
-
if (bus_type & ASC_IS_EISA) {
/*
* cfg_lsw = AscGetEisaChipCfg(iot, ioh); chip_irq =
@@ -2108,15 +1950,11 @@ AscGetChipIRQ(iot, ioh, bus_type)
static u_int8_t
-AscSetChipIRQ(iot, ioh, irq_no, bus_type)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t irq_no;
- u_int16_t bus_type;
+AscSetChipIRQ(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t irq_no,
+ u_int16_t bus_type)
{
u_int16_t cfg_lsw;
-
if (bus_type & ASC_IS_VL) {
if (irq_no) {
if ((irq_no < ASC_MIN_IRQ_NO) || (irq_no > ASC_MAX_IRQ_NO))
@@ -2151,15 +1989,12 @@ AscSetChipIRQ(iot, ioh, irq_no, bus_type)
static void
-AscAckInterrupt(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscAckInterrupt(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int8_t host_flag;
u_int8_t risc_flag;
u_int16_t loop;
-
loop = 0;
do {
risc_flag = AscReadLramByte(iot, ioh, ASCV_RISC_FLAG_B);
@@ -2185,8 +2020,7 @@ AscAckInterrupt(iot, ioh)
static u_int32_t
-AscGetMaxDmaCount(bus_type)
- u_int16_t bus_type;
+AscGetMaxDmaCount(u_int16_t bus_type)
{
if (bus_type & ASC_IS_ISA)
return (ASC_MAX_ISA_DMA_COUNT);
@@ -2197,9 +2031,7 @@ AscGetMaxDmaCount(bus_type)
static u_int16_t
-AscGetIsaDmaChannel(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscGetIsaDmaChannel(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int16_t channel;
@@ -2213,10 +2045,8 @@ AscGetIsaDmaChannel(iot, ioh)
static u_int16_t
-AscSetIsaDmaChannel(iot, ioh, dma_channel)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t dma_channel;
+AscSetIsaDmaChannel(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int16_t dma_channel)
{
u_int16_t cfg_lsw;
u_int8_t value;
@@ -2236,9 +2066,7 @@ AscSetIsaDmaChannel(iot, ioh, dma_channel)
static u_int8_t
-AscGetIsaDmaSpeed(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscGetIsaDmaSpeed(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int8_t speed_value;
@@ -2251,10 +2079,8 @@ AscGetIsaDmaSpeed(iot, ioh)
static u_int8_t
-AscSetIsaDmaSpeed(iot, ioh, speed_value)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t speed_value;
+AscSetIsaDmaSpeed(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int8_t speed_value)
{
speed_value &= 0x07;
AscSetBank(iot, ioh, 1);
@@ -2270,13 +2096,8 @@ AscSetIsaDmaSpeed(iot, ioh, speed_value)
static void
-AscHandleExtMsgIn(sc, halt_q_addr, q_cntl, target_id, tid_no, asyn_sdtr)
- ASC_SOFTC *sc;
- u_int16_t halt_q_addr;
- u_int8_t q_cntl;
- ASC_SCSI_BIT_ID_TYPE target_id;
- int tid_no;
- u_int8_t asyn_sdtr;
+AscHandleExtMsgIn(ASC_SOFTC *sc, u_int16_t halt_q_addr, u_int8_t q_cntl,
+ ASC_SCSI_BIT_ID_TYPE target_id, int tid_no, u_int8_t asyn_sdtr)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2284,7 +2105,6 @@ AscHandleExtMsgIn(sc, halt_q_addr, q_cntl, target_id, tid_no, asyn_sdtr)
u_int8_t sdtr_data;
int sdtr_accept;
-
AscMemWordCopyFromLram(iot, ioh, ASCV_MSGIN_BEG,
(u_int16_t *) & ext_msg, sizeof(EXT_MSG) >> 1);
@@ -2362,17 +2182,13 @@ AscHandleExtMsgIn(sc, halt_q_addr, q_cntl, target_id, tid_no, asyn_sdtr)
static u_int8_t
-AscMsgOutSDTR(sc, sdtr_period, sdtr_offset)
- ASC_SOFTC *sc;
- u_int8_t sdtr_period;
- u_int8_t sdtr_offset;
+AscMsgOutSDTR(ASC_SOFTC *sc, u_int8_t sdtr_period, u_int8_t sdtr_offset)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
EXT_MSG sdtr_buf;
u_int8_t sdtr_period_index;
-
sdtr_buf.msg_type = MS_EXTEND;
sdtr_buf.msg_len = MS_SDTR_LEN;
sdtr_buf.msg_req = MS_SDTR_CODE;
@@ -2399,11 +2215,8 @@ AscMsgOutSDTR(sc, sdtr_period, sdtr_offset)
static void
-AscSetChipSDTR(iot, ioh, sdtr_data, tid_no)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t sdtr_data;
- u_int8_t tid_no;
+AscSetChipSDTR(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t sdtr_data,
+ u_int8_t tid_no)
{
AscSetChipSynRegAtID(iot, ioh, tid_no, sdtr_data);
AscWriteLramByte(iot, ioh, tid_no + ASCV_SDTR_DONE_BEG, sdtr_data);
@@ -2411,10 +2224,7 @@ AscSetChipSDTR(iot, ioh, sdtr_data, tid_no)
static u_int8_t
-AscCalSDTRData(sc, sdtr_period, syn_offset)
- ASC_SOFTC *sc;
- u_int8_t sdtr_period;
- u_int8_t syn_offset;
+AscCalSDTRData(ASC_SOFTC *sc, u_int8_t sdtr_period, u_int8_t syn_offset)
{
u_int8_t byte;
u_int8_t sdtr_period_ix;
@@ -2429,9 +2239,7 @@ AscCalSDTRData(sc, sdtr_period, syn_offset)
static u_int8_t
-AscGetSynPeriodIndex(sc, syn_time)
- ASC_SOFTC *sc;
- u_int8_t syn_time;
+AscGetSynPeriodIndex(ASC_SOFTC *sc, u_int8_t syn_time)
{
u_int8_t *period_table;
int max_index;
@@ -2461,9 +2269,7 @@ AscGetSynPeriodIndex(sc, syn_time)
* Send a command to the board
*/
int
-AscExeScsiQueue(sc, scsiq)
- ASC_SOFTC *sc;
- ASC_SCSI_Q *scsiq;
+AscExeScsiQueue(ASC_SOFTC *sc, ASC_SCSI_Q *scsiq)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2482,7 +2288,6 @@ AscExeScsiQueue(sc, scsiq)
u_int8_t scsi_cmd;
u_int32_t data_cnt;
-
scsiq->q1.q_no = 0;
if ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0)
scsiq->q1.extra_bytes = 0;
@@ -2612,10 +2417,7 @@ AscExeScsiQueue(sc, scsiq)
static int
-AscSendScsiQueue(sc, scsiq, n_q_required)
- ASC_SOFTC *sc;
- ASC_SCSI_Q *scsiq;
- u_int8_t n_q_required;
+AscSendScsiQueue(ASC_SOFTC *sc, ASC_SCSI_Q *scsiq, u_int8_t n_q_required)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2625,7 +2427,6 @@ AscSendScsiQueue(sc, scsiq, n_q_required)
u_int8_t target_ix;
int retval;
-
target_ix = scsiq->q2.target_ix;
tid_no = ASC_TIX_TO_TID(target_ix);
retval = ASC_BUSY;
@@ -2650,10 +2451,7 @@ AscSendScsiQueue(sc, scsiq, n_q_required)
static int
-AscPutReadySgListQueue(sc, scsiq, q_no)
- ASC_SOFTC *sc;
- ASC_SCSI_Q *scsiq;
- u_int8_t q_no;
+AscPutReadySgListQueue(ASC_SOFTC *sc, ASC_SCSI_Q *scsiq, u_int8_t q_no)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2669,7 +2467,6 @@ AscPutReadySgListQueue(sc, scsiq, q_no)
u_int16_t q_addr;
u_int8_t next_qp;
-
saved_data_addr = scsiq->q1.data_addr;
saved_data_cnt = scsiq->q1.data_cnt;
@@ -2738,10 +2535,7 @@ AscPutReadySgListQueue(sc, scsiq, q_no)
static int
-AscPutReadyQueue(sc, scsiq, q_no)
- ASC_SOFTC *sc;
- ASC_SCSI_Q *scsiq;
- u_int8_t q_no;
+AscPutReadyQueue(ASC_SOFTC *sc, ASC_SCSI_Q *scsiq, u_int8_t q_no)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2751,7 +2545,6 @@ AscPutReadyQueue(sc, scsiq, q_no)
u_int8_t syn_period_ix;
u_int8_t syn_offset;
-
if (((sc->init_sdtr & scsiq->q1.target_id) != 0) &&
((sc->sdtr_done & scsiq->q1.target_id) == 0)) {
tid_no = ASC_TIX_TO_TID(scsiq->q2.target_ix);
@@ -2783,15 +2576,11 @@ AscPutReadyQueue(sc, scsiq, q_no)
static void
-AscPutSCSIQ(iot, ioh, addr, scsiq)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int16_t addr;
- ASC_SCSI_Q *scsiq;
+AscPutSCSIQ(bus_space_tag_t iot, bus_space_handle_t ioh, u_int16_t addr,
+ ASC_SCSI_Q *scsiq)
{
u_int16_t val;
-
ASC_SET_CHIP_LRAM_ADDR(iot, ioh, addr);
/* ASC_SCSIQ_1 */
@@ -2828,8 +2617,7 @@ AscPutSCSIQ(iot, ioh, addr, scsiq)
static int
-AscSgListToQueue(sg_list)
- int sg_list;
+AscSgListToQueue(int sg_list)
{
int n_sg_list_qs;
@@ -2842,15 +2630,11 @@ AscSgListToQueue(sg_list)
static u_int
-AscGetNumOfFreeQueue(sc, target_ix, n_qs)
- ASC_SOFTC *sc;
- u_int8_t target_ix;
- u_int8_t n_qs;
+AscGetNumOfFreeQueue(ASC_SOFTC *sc, u_int8_t target_ix, u_int8_t n_qs)
{
u_int cur_used_qs;
u_int cur_free_qs;
-
if (n_qs == 1) {
cur_used_qs = sc->cur_total_qng +
sc->last_q_shortage +
@@ -2873,16 +2657,13 @@ AscGetNumOfFreeQueue(sc, target_ix, n_qs)
static u_int8_t
-AscAllocFreeQueue(iot, ioh, free_q_head)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t free_q_head;
+AscAllocFreeQueue(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int8_t free_q_head)
{
u_int16_t q_addr;
u_int8_t next_qp;
u_int8_t q_status;
-
q_addr = ASC_QNO_TO_QADDR(free_q_head);
q_status = AscReadLramByte(iot, ioh, q_addr + ASC_SCSIQ_B_STATUS);
next_qp = AscReadLramByte(iot, ioh, q_addr + ASC_SCSIQ_B_FWD);
@@ -2894,11 +2675,8 @@ AscAllocFreeQueue(iot, ioh, free_q_head)
static u_int8_t
-AscAllocMultipleFreeQueue(iot, ioh, free_q_head, n_free_q)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- u_int8_t free_q_head;
- u_int8_t n_free_q;
+AscAllocMultipleFreeQueue(bus_space_tag_t iot, bus_space_handle_t ioh,
+ u_int8_t free_q_head, u_int8_t n_free_q)
{
u_int8_t i;
@@ -2913,9 +2691,7 @@ AscAllocMultipleFreeQueue(iot, ioh, free_q_head, n_free_q)
static int
-AscStopQueueExe(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscStopQueueExe(bus_space_tag_t iot, bus_space_handle_t ioh)
{
int count = 0;
@@ -2934,25 +2710,19 @@ AscStopQueueExe(iot, ioh)
static void
-AscStartQueueExe(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscStartQueueExe(bus_space_tag_t iot, bus_space_handle_t ioh)
{
-
if (AscReadLramByte(iot, ioh, ASCV_STOP_CODE_B) != 0)
AscWriteLramByte(iot, ioh, ASCV_STOP_CODE_B, 0);
}
static void
-AscCleanUpBusyQueue(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscCleanUpBusyQueue(bus_space_tag_t iot, bus_space_handle_t ioh)
{
int count = 0;
u_int8_t stop_code;
-
if (AscReadLramByte(iot, ioh, ASCV_STOP_CODE_B) != 0) {
AscWriteLramByte(iot, ioh, ASCV_STOP_CODE_B, ASC_STOP_CLEAN_UP_BUSY_Q);
do {
@@ -2967,10 +2737,7 @@ AscCleanUpBusyQueue(iot, ioh)
static int
-_AscWaitQDone(iot, ioh, scsiq)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- ASC_SCSI_Q *scsiq;
+_AscWaitQDone(bus_space_tag_t iot, bus_space_handle_t ioh, ASC_SCSI_Q *scsiq)
{
u_int16_t q_addr;
u_int8_t q_status;
@@ -2992,9 +2759,7 @@ _AscWaitQDone(iot, ioh, scsiq)
static int
-AscCleanUpDiscQueue(iot, ioh)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+AscCleanUpDiscQueue(bus_space_tag_t iot, bus_space_handle_t ioh)
{
int count;
u_int8_t stop_code;
@@ -3020,16 +2785,13 @@ AscCleanUpDiscQueue(iot, ioh)
int
-AscAbortCCB(sc, ccb)
- ASC_SOFTC *sc;
- u_int32_t ccb;
+AscAbortCCB(ASC_SOFTC *sc, u_int32_t ccb)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
int retval;
ASC_SCSI_BIT_ID_TYPE saved_unit_not_ready;
-
retval = -1;
saved_unit_not_ready = sc->unit_not_ready;
sc->unit_not_ready = 0xFF;
@@ -3051,9 +2813,7 @@ AscAbortCCB(sc, ccb)
static int
-AscRiscHaltedAbortCCB(sc, ccb)
- ASC_SOFTC *sc;
- u_int32_t ccb;
+AscRiscHaltedAbortCCB(ASC_SOFTC *sc, u_int32_t ccb)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -3064,7 +2824,6 @@ AscRiscHaltedAbortCCB(sc, ccb)
ASC_ISR_CALLBACK asc_isr_callback;
int last_int_level;
-
asc_isr_callback = (ASC_ISR_CALLBACK) sc->isr_callback;
last_int_level = DvcEnterCritical();
scsiq = (ASC_QDONE_INFO *) & scsiq_buf;
@@ -3096,9 +2855,7 @@ AscRiscHaltedAbortCCB(sc, ccb)
static int
-AscRiscHaltedAbortTIX(sc, target_ix)
- ASC_SOFTC *sc;
- u_int8_t target_ix;
+AscRiscHaltedAbortTIX(ASC_SOFTC *sc, u_int8_t target_ix)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -3109,7 +2866,6 @@ AscRiscHaltedAbortTIX(sc, target_ix)
ASC_ISR_CALLBACK asc_isr_callback;
int last_int_level;
-
asc_isr_callback = (ASC_ISR_CALLBACK) sc->isr_callback;
last_int_level = DvcEnterCritical();
scsiq = (ASC_QDONE_INFO *) & scsiq_buf;
@@ -3140,9 +2896,7 @@ AscRiscHaltedAbortTIX(sc, target_ix)
* because at boot time interrupts are disabled.
*/
int
-AscResetDevice(sc, target_ix)
- ASC_SOFTC *sc;
- u_char target_ix;
+AscResetDevice(ASC_SOFTC *sc, u_char target_ix)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -3210,15 +2964,13 @@ AscResetDevice(sc, target_ix)
int
-AscResetBus(sc)
- ASC_SOFTC *sc;
+AscResetBus(ASC_SOFTC *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
int retval;
int i;
-
sc->unit_not_ready = 0xFF;
retval = ASC_NOERROR;
@@ -3254,9 +3006,7 @@ AscResetBus(sc)
static int
-AscSetLibErrorCode(sc, err_code)
- ASC_SOFTC *sc;
- u_int16_t err_code;
+AscSetLibErrorCode(ASC_SOFTC *sc, u_int16_t err_code)
{
/*
* if(sc->err_code == 0) { sc->err_code = err_code;
@@ -3275,17 +3025,13 @@ AscSetLibErrorCode(sc, err_code)
void
-AscInquiryHandling(sc, tid_no, inq)
- ASC_SOFTC *sc;
- u_int8_t tid_no;
- ASC_SCSI_INQUIRY *inq;
+AscInquiryHandling(ASC_SOFTC *sc, u_int8_t tid_no, ASC_SCSI_INQUIRY *inq)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
ASC_SCSI_BIT_ID_TYPE tid_bit = ASC_TIX_TO_TARGET_ID(tid_no);
ASC_SCSI_BIT_ID_TYPE orig_init_sdtr, orig_use_tagged_qng;
-
orig_init_sdtr = sc->init_sdtr;
orig_use_tagged_qng = sc->use_tagged_qng;
@@ -3322,8 +3068,7 @@ AscInquiryHandling(sc, tid_no, inq)
static int
-AscTagQueuingSafe(inq)
- ASC_SCSI_INQUIRY *inq;
+AscTagQueuingSafe(ASC_SCSI_INQUIRY *inq)
{
if ((inq->add_len >= 32) &&
(AscCompareString(inq->vendor_id, "QUANTUM XP34301", 15) == 0) &&
@@ -3335,15 +3080,11 @@ AscTagQueuingSafe(inq)
static void
-AscAsyncFix(sc, tid_no, inq)
- ASC_SOFTC *sc;
- u_int8_t tid_no;
- ASC_SCSI_INQUIRY *inq;
+AscAsyncFix(ASC_SOFTC *sc, u_int8_t tid_no, ASC_SCSI_INQUIRY *inq)
{
u_int8_t dvc_type;
ASC_SCSI_BIT_ID_TYPE tid_bits;
-
dvc_type = inq->byte0.peri_dvc_type;
tid_bits = ASC_TIX_TO_TARGET_ID(tid_no);
@@ -3392,10 +3133,7 @@ AscAsyncFix(sc, tid_no, inq)
static int
-AscCompareString(str1, str2, len)
- u_char *str1;
- u_char *str2;
- int len;
+AscCompareString(u_char *str1, u_char *str2, int len)
{
int i;
int diff;
@@ -3426,36 +3164,28 @@ DvcEnterCritical(void)
static void
-DvcLeaveCritical(s)
- int s;
+DvcLeaveCritical(int s)
{
-
splx(s);
}
static void
-DvcSleepMilliSecond(n)
- u_int32_t n;
+DvcSleepMilliSecond(u_int32_t n)
{
-
DELAY(n * 1000);
}
#ifdef UNUSED
static void
-DvcDelayMicroSecond(n)
- u_int32_t n;
+DvcDelayMicroSecond(u_int32_t n)
{
-
DELAY(n);
}
#endif
static void
-DvcDelayNanoSecond(n)
- u_int32_t n;
+DvcDelayNanoSecond(u_int32_t n)
{
-
DELAY((n + 999) / 1000);
}
diff --git a/sys/dev/isa/ess.c b/sys/dev/isa/ess.c
index 7e5f0bff2c3..73375d6d74d 100644
--- a/sys/dev/isa/ess.c
+++ b/sys/dev/isa/ess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ess.c,v 1.18 2013/05/24 07:58:46 ratchov Exp $ */
+/* $OpenBSD: ess.c,v 1.19 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: ess.c,v 1.44.4.1 1999/06/21 01:18:00 thorpej Exp $ */
/*
@@ -275,8 +275,7 @@ void ess_printsc(struct ess_softc *);
void ess_dump_mixer(struct ess_softc *);
void
-ess_printsc(sc)
- struct ess_softc *sc;
+ess_printsc(struct ess_softc *sc)
{
int i;
@@ -301,8 +300,7 @@ ess_printsc(sc)
}
void
-ess_dump_mixer(sc)
- struct ess_softc *sc;
+ess_dump_mixer(struct ess_softc *sc)
{
printf("ESS_DAC_PLAY_VOL: mix reg 0x%02x=0x%02x\n",
0x7C, ess_read_mix_reg(sc, 0x7C));
@@ -352,8 +350,7 @@ ess_dump_mixer(sc)
* Configure the ESS chip for the desired audio base address.
*/
int
-ess_config_addr(sc)
- struct ess_softc *sc;
+ess_config_addr(struct ess_softc *sc)
{
int iobase = sc->sc_iobase;
bus_space_tag_t iot = sc->sc_iot;
@@ -446,8 +443,7 @@ ess_config_addr(sc)
* DRQD drq5
*/
void
-ess_config_irq(sc)
- struct ess_softc *sc;
+ess_config_irq(struct ess_softc *sc)
{
int v;
@@ -536,8 +532,7 @@ ess_config_irq(sc)
void
-ess_config_drq(sc)
- struct ess_softc *sc;
+ess_config_drq(struct ess_softc *sc)
{
int v;
@@ -600,10 +595,8 @@ ess_config_drq(sc)
* Set up registers after a reset.
*/
void
-ess_setup(sc)
- struct ess_softc *sc;
+ess_setup(struct ess_softc *sc)
{
-
ess_config_irq(sc);
ess_config_drq(sc);
@@ -619,8 +612,7 @@ ess_setup(sc)
* This routine sets the values of sc->sc_model and sc->sc_version.
*/
int
-ess_identify(sc)
- struct ess_softc *sc;
+ess_identify(struct ess_softc *sc)
{
u_char reg1;
u_char reg2;
@@ -779,9 +771,7 @@ ess_identify(sc)
int
-ess_setup_sc(sc, doinit)
- struct ess_softc *sc;
- int doinit;
+ess_setup_sc(struct ess_softc *sc, int doinit)
{
/* Reset the chip. */
if (ess_reset(sc) != 0) {
@@ -802,8 +792,7 @@ ess_setup_sc(sc, doinit)
* Probe for the ESS hardware.
*/
int
-essmatch(sc)
- struct ess_softc *sc;
+essmatch(struct ess_softc *sc)
{
if (!ESS_BASE_VALID(sc->sc_iobase)) {
printf("ess: configured iobase 0x%x invalid\n", sc->sc_iobase);
@@ -885,8 +874,7 @@ irq_not1888:
* pseudo-device driver.
*/
void
-essattach(sc)
- struct ess_softc *sc;
+essattach(struct ess_softc *sc)
{
struct audio_attach_args arg;
struct audio_params pparams, rparams;
@@ -1035,9 +1023,7 @@ essattach(sc)
*/
int
-ess_open(addr, flags)
- void *addr;
- int flags;
+ess_open(void *addr, int flags)
{
struct ess_softc *sc = addr;
@@ -1056,8 +1042,7 @@ ess_open(addr, flags)
}
void
-ess_1788_close(addr)
- void *addr;
+ess_1788_close(void *addr)
{
struct ess_softc *sc = addr;
@@ -1073,8 +1058,7 @@ ess_1788_close(addr)
}
void
-ess_1888_close(addr)
- void *addr;
+ess_1888_close(void *addr)
{
struct ess_softc *sc = addr;
@@ -1095,8 +1079,7 @@ ess_1888_close(addr)
* XXX should check FIFO empty bit.
*/
int
-ess_drain(addr)
- void *addr;
+ess_drain(void *addr)
{
tsleep(addr, PWAIT | PCATCH, "essdr", hz/20); /* XXX */
return (0);
@@ -1104,9 +1087,7 @@ ess_drain(addr)
/* XXX should use reference count */
int
-ess_speaker_ctl(addr, newstate)
- void *addr;
- int newstate;
+ess_speaker_ctl(void *addr, int newstate)
{
struct ess_softc *sc = addr;
@@ -1122,18 +1103,14 @@ ess_speaker_ctl(addr, newstate)
}
int
-ess_getdev(addr, retp)
- void *addr;
- struct audio_device *retp;
+ess_getdev(void *addr, struct audio_device *retp)
{
*retp = ess_device;
return (0);
}
int
-ess_query_encoding(addr, fp)
- void *addr;
- struct audio_encoding *fp;
+ess_query_encoding(void *addr, struct audio_encoding *fp)
{
/*struct ess_softc *sc = addr;*/
@@ -1196,10 +1173,8 @@ ess_query_encoding(addr, fp)
}
int
-ess_set_params(addr, setmode, usemode, play, rec)
- void *addr;
- int setmode, usemode;
- struct audio_params *play, *rec;
+ess_set_params(void *addr, int setmode, int usemode,
+ struct audio_params *play, struct audio_params *rec)
{
struct ess_softc *sc = addr;
struct audio_params *p;
@@ -1292,13 +1267,8 @@ ess_set_params(addr, setmode, usemode, play, rec)
}
int
-ess_audio1_trigger_output(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+ess_audio1_trigger_output(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct ess_softc *sc = addr;
u_int8_t reg;
@@ -1371,13 +1341,8 @@ ess_audio1_trigger_output(addr, start, end, blksize, intr, arg, param)
}
int
-ess_audio2_trigger_output(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+ess_audio2_trigger_output(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct ess_softc *sc = addr;
u_int8_t reg;
@@ -1441,13 +1406,8 @@ ess_audio2_trigger_output(addr, start, end, blksize, intr, arg, param)
}
int
-ess_audio1_trigger_input(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+ess_audio1_trigger_input(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct ess_softc *sc = addr;
u_int8_t reg;
@@ -1520,8 +1480,7 @@ ess_audio1_trigger_input(addr, start, end, blksize, intr, arg, param)
}
int
-ess_audio1_halt(addr)
- void *addr;
+ess_audio1_halt(void *addr)
{
struct ess_softc *sc = addr;
@@ -1540,8 +1499,7 @@ ess_audio1_halt(addr)
}
int
-ess_audio2_halt(addr)
- void *addr;
+ess_audio2_halt(void *addr)
{
struct ess_softc *sc = addr;
@@ -1561,8 +1519,7 @@ ess_audio2_halt(addr)
}
int
-ess_audio1_intr(arg)
- void *arg;
+ess_audio1_intr(void *arg)
{
struct ess_softc *sc = arg;
u_int8_t reg;
@@ -1591,8 +1548,7 @@ ess_audio1_intr(arg)
}
int
-ess_audio2_intr(arg)
- void *arg;
+ess_audio2_intr(void *arg)
{
struct ess_softc *sc = arg;
u_int8_t reg;
@@ -1622,8 +1578,7 @@ ess_audio2_intr(arg)
}
void
-ess_audio1_poll(addr)
- void *addr;
+ess_audio1_poll(void *addr)
{
struct ess_softc *sc = addr;
int dmapos, dmacount;
@@ -1654,8 +1609,7 @@ ess_audio1_poll(addr)
}
void
-ess_audio2_poll(addr)
- void *addr;
+ess_audio2_poll(void *addr)
{
struct ess_softc *sc = addr;
int dmapos, dmacount;
@@ -1686,17 +1640,13 @@ ess_audio2_poll(addr)
}
int
-ess_round_blocksize(addr, blk)
- void *addr;
- int blk;
+ess_round_blocksize(void *addr, int blk)
{
return ((blk + 7) & -8); /* round for max DMA size */
}
int
-ess_set_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+ess_set_port(void *addr, mixer_ctrl_t *cp)
{
struct ess_softc *sc = addr;
int lgain, rgain;
@@ -1835,9 +1785,7 @@ ess_set_port(addr, cp)
}
int
-ess_get_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+ess_get_port(void *addr, mixer_ctrl_t *cp)
{
struct ess_softc *sc = addr;
@@ -1925,9 +1873,7 @@ ess_get_port(addr, cp)
}
int
-ess_query_devinfo(addr, dip)
- void *addr;
- mixer_devinfo_t *dip;
+ess_query_devinfo(void *addr, mixer_devinfo_t *dip)
{
struct ess_softc *sc = addr;
@@ -2224,11 +2170,7 @@ ess_query_devinfo(addr, dip)
}
void *
-ess_malloc(addr, direction, size, pool, flags)
- void *addr;
- int direction;
- size_t size;
- int pool, flags;
+ess_malloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct ess_softc *sc = addr;
int drq;
@@ -2241,19 +2183,13 @@ ess_malloc(addr, direction, size, pool, flags)
}
void
-ess_free(addr, ptr, pool)
- void *addr;
- void *ptr;
- int pool;
+ess_free(void *addr, void *ptr, int pool)
{
isa_free(ptr, pool);
}
size_t
-ess_round_buffersize(addr, direction, size)
- void *addr;
- int direction;
- size_t size;
+ess_round_buffersize(void *addr, int direction, size_t size)
{
if (size > MAX_ISADMA)
size = MAX_ISADMA;
@@ -2261,28 +2197,20 @@ ess_round_buffersize(addr, direction, size)
}
paddr_t
-ess_mappage(addr, mem, off, prot)
- void *addr;
- void *mem;
- off_t off;
- int prot;
+ess_mappage(void *addr, void *mem, off_t off, int prot)
{
return (isa_mappage(mem, off, prot));
}
int
-ess_1788_get_props(addr)
- void *addr;
+ess_1788_get_props(void *addr)
{
-
return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT);
}
int
-ess_1888_get_props(addr)
- void *addr;
+ess_1888_get_props(void *addr)
{
-
return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX);
}
@@ -2296,8 +2224,7 @@ ess_1888_get_props(addr)
* Return non-zero if the chip isn't detected.
*/
int
-ess_reset(sc)
- struct ess_softc *sc;
+ess_reset(struct ess_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2415,9 +2342,7 @@ ess_set_gain(sc, port, on)
/* Set the input device on devices without an input mixer. */
int
-ess_set_in_port(sc, ord)
- struct ess_softc *sc;
- int ord;
+ess_set_in_port(struct ess_softc *sc, int ord)
{
mixer_devinfo_t di;
int i;
@@ -2448,9 +2373,7 @@ ess_set_in_port(sc, ord)
/* Set the input device levels on input-mixer-enabled devices. */
int
-ess_set_in_ports(sc, mask)
- struct ess_softc *sc;
- int mask;
+ess_set_in_ports(struct ess_softc *sc, int mask)
{
mixer_devinfo_t di;
int i, port;
@@ -2488,16 +2411,14 @@ ess_set_in_ports(sc, mask)
}
void
-ess_speaker_on(sc)
- struct ess_softc *sc;
+ess_speaker_on(struct ess_softc *sc)
{
/* Unmute the DAC. */
ess_set_gain(sc, ESS_DAC_PLAY_VOL, 1);
}
void
-ess_speaker_off(sc)
- struct ess_softc *sc;
+ess_speaker_off(struct ess_softc *sc)
{
/* Mute the DAC. */
ess_set_gain(sc, ESS_DAC_PLAY_VOL, 0);
@@ -2507,8 +2428,7 @@ ess_speaker_off(sc)
* Calculate the time constant for the requested sampling rate.
*/
u_int
-ess_srtotc(rate)
- u_int rate;
+ess_srtotc(u_int rate)
{
u_int tc;
@@ -2526,8 +2446,7 @@ ess_srtotc(rate)
* Calculate the filter constant for the reuqested sampling rate.
*/
u_int
-ess_srtofc(rate)
- u_int rate;
+ess_srtofc(u_int rate)
{
/*
* The following formula is derived from the information in
@@ -2542,8 +2461,7 @@ ess_srtofc(rate)
* Return the status of the DSP.
*/
u_char
-ess_get_dsp_status(sc)
- struct ess_softc *sc;
+ess_get_dsp_status(struct ess_softc *sc)
{
return (EREAD1(sc->sc_iot, sc->sc_ioh, ESS_DSP_RW_STATUS));
}
@@ -2554,8 +2472,7 @@ ess_get_dsp_status(sc)
* 0 -> DSP not ready for reading
*/
u_char
-ess_dsp_read_ready(sc)
- struct ess_softc *sc;
+ess_dsp_read_ready(struct ess_softc *sc)
{
return ((ess_get_dsp_status(sc) & ESS_DSP_READ_READY) ? 1 : 0);
}
@@ -2566,8 +2483,7 @@ ess_dsp_read_ready(sc)
* 0 -> DSP not ready for writing
*/
u_char
-ess_dsp_write_ready(sc)
- struct ess_softc *sc;
+ess_dsp_write_ready(struct ess_softc *sc)
{
return ((ess_get_dsp_status(sc) & ESS_DSP_WRITE_BUSY) ? 0 : 1);
}
@@ -2577,8 +2493,7 @@ ess_dsp_write_ready(sc)
* Read a byte from the DSP.
*/
int
-ess_rdsp(sc)
- struct ess_softc *sc;
+ess_rdsp(struct ess_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2601,9 +2516,7 @@ ess_rdsp(sc)
* Write a byte to the DSP.
*/
int
-ess_wdsp(sc, v)
- struct ess_softc *sc;
- u_char v;
+ess_wdsp(struct ess_softc *sc, u_char v)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2627,10 +2540,7 @@ ess_wdsp(sc, v)
* Write a value to one of the ESS extended registers.
*/
int
-ess_write_x_reg(sc, reg, val)
- struct ess_softc *sc;
- u_char reg;
- u_char val;
+ess_write_x_reg(struct ess_softc *sc, u_char reg, u_char val)
{
int error;
@@ -2645,9 +2555,7 @@ ess_write_x_reg(sc, reg, val)
* Read the value of one of the ESS extended registers.
*/
u_char
-ess_read_x_reg(sc, reg)
- struct ess_softc *sc;
- u_char reg;
+ess_read_x_reg(struct ess_softc *sc, u_char reg)
{
int error;
int val;
@@ -2663,10 +2571,7 @@ ess_read_x_reg(sc, reg)
}
void
-ess_clear_xreg_bits(sc, reg, mask)
- struct ess_softc *sc;
- u_char reg;
- u_char mask;
+ess_clear_xreg_bits(struct ess_softc *sc, u_char reg, u_char mask)
{
if (ess_write_x_reg(sc, reg, ess_read_x_reg(sc, reg) & ~mask) == -1)
DPRINTF(("Error clearing bits in extended register 0x%02x\n",
@@ -2674,10 +2579,7 @@ ess_clear_xreg_bits(sc, reg, mask)
}
void
-ess_set_xreg_bits(sc, reg, mask)
- struct ess_softc *sc;
- u_char reg;
- u_char mask;
+ess_set_xreg_bits(struct ess_softc *sc, u_char reg, u_char mask)
{
if (ess_write_x_reg(sc, reg, ess_read_x_reg(sc, reg) | mask) == -1)
DPRINTF(("Error setting bits in extended register 0x%02x\n",
@@ -2689,10 +2591,7 @@ ess_set_xreg_bits(sc, reg, mask)
* Write a value to one of the ESS mixer registers.
*/
void
-ess_write_mix_reg(sc, reg, val)
- struct ess_softc *sc;
- u_char reg;
- u_char val;
+ess_write_mix_reg(struct ess_softc *sc, u_char reg, u_char val)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2709,9 +2608,7 @@ ess_write_mix_reg(sc, reg, val)
* Read the value of one of the ESS mixer registers.
*/
u_char
-ess_read_mix_reg(sc, reg)
- struct ess_softc *sc;
- u_char reg;
+ess_read_mix_reg(struct ess_softc *sc, u_char reg)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2727,29 +2624,20 @@ ess_read_mix_reg(sc, reg)
}
void
-ess_clear_mreg_bits(sc, reg, mask)
- struct ess_softc *sc;
- u_char reg;
- u_char mask;
+ess_clear_mreg_bits(struct ess_softc *sc, u_char reg, u_char mask)
{
ess_write_mix_reg(sc, reg, ess_read_mix_reg(sc, reg) & ~mask);
}
void
-ess_set_mreg_bits(sc, reg, mask)
- struct ess_softc *sc;
- u_char reg;
- u_char mask;
+ess_set_mreg_bits(struct ess_softc *sc, u_char reg, u_char mask)
{
ess_write_mix_reg(sc, reg, ess_read_mix_reg(sc, reg) | mask);
}
void
-ess_read_multi_mix_reg(sc, reg, datap, count)
- struct ess_softc *sc;
- u_char reg;
- u_int8_t *datap;
- bus_size_t count;
+ess_read_multi_mix_reg(struct ess_softc *sc, u_char reg, u_int8_t *datap,
+ bus_size_t count)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
diff --git a/sys/dev/isa/ess_isapnp.c b/sys/dev/isa/ess_isapnp.c
index fb2d76e4cb1..b1a0e580078 100644
--- a/sys/dev/isa/ess_isapnp.c
+++ b/sys/dev/isa/ess_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ess_isapnp.c,v 1.6 2008/06/26 05:42:16 ray Exp $ */
+/* $OpenBSD: ess_isapnp.c,v 1.7 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: ess_isa.c,v 1.4 1999/03/18 20:57:11 mycroft Exp $ */
/*-
@@ -58,16 +58,12 @@ struct cfattach ess_isapnp_ca = {
};
int
-ess_isapnp_probe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ess_isapnp_probe(struct device *parent, void *match, void *aux)
{
return 1;
}
-void ess_isapnp_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+void ess_isapnp_attach(struct device *parent, struct device *self, void *aux)
{
struct ess_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c
index 2ea81646b2e..1fa77ae8833 100644
--- a/sys/dev/isa/gus.c
+++ b/sys/dev/isa/gus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gus.c,v 1.38 2013/06/26 09:39:56 kettenis Exp $ */
+/* $OpenBSD: gus.c,v 1.39 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
/*-
@@ -351,9 +351,7 @@ struct audio_device gus_device = {
int
-gusopen(addr, flags)
- void *addr;
- int flags;
+gusopen(void *addr, int flags)
{
struct gus_softc *sc = addr;
@@ -394,19 +392,14 @@ gusopen(addr, flags)
}
int
-gusmaxopen(addr, flags)
- void *addr;
- int flags;
+gusmaxopen(void *addr, int flags)
{
struct ad1848_softc *ac = addr;
return gusopen(ac->parent, flags);
}
void
-gus_deinterleave(sc, buf, size)
- struct gus_softc *sc;
- void *buf;
- int size;
+gus_deinterleave(struct gus_softc *sc, void *buf, int size)
{
/* deinterleave the stereo data. We can use sc->sc_deintr_buf
for scratch space. */
@@ -459,12 +452,8 @@ gus_deinterleave(sc, buf, size)
*/
int
-gusmax_dma_output(addr, buf, size, intr, arg)
- void * addr;
- void *buf;
- int size;
- void (*intr)(void *);
- void *arg;
+gusmax_dma_output(void *addr, void *buf, int size, void (*intr)(void *),
+ void *arg)
{
struct ad1848_softc *ac = addr;
return gus_dma_output(ac->parent, buf, size, intr, arg);
@@ -474,8 +463,7 @@ gusmax_dma_output(addr, buf, size, intr, arg)
* called at splaudio() from interrupt handler.
*/
void
-stereo_dmaintr(arg)
- void *arg;
+stereo_dmaintr(void *arg)
{
struct gus_softc *sc = arg;
struct stereo_dma_intr *sa = &sc->sc_stereo;
@@ -517,12 +505,7 @@ stereo_dmaintr(arg)
* generic audio code.
*/
int
-gus_dma_output(addr, buf, size, intr, arg)
- void * addr;
- void *buf;
- int size;
- void (*intr)(void *);
- void *arg;
+gus_dma_output(void *addr, void *buf, int size, void (*intr)(void *), void *arg)
{
struct gus_softc *sc = addr;
u_char *buffer = buf;
@@ -604,8 +587,7 @@ gus_dma_output(addr, buf, size, intr, arg)
}
void
-gusmax_close(addr)
- void *addr;
+gusmax_close(void *addr)
{
struct ad1848_softc *ac = addr;
struct gus_softc *sc = ac->parent;
@@ -621,14 +603,12 @@ gusmax_close(addr)
* Close out device stuff. Called at splaudio() from generic audio layer.
*/
void
-gusclose(addr)
- void *addr;
+gusclose(void *addr)
{
struct gus_softc *sc = addr;
DPRINTF(("gus_close: sc=%p\n", sc));
-
/* if (sc->sc_flags & GUS_DMAOUT_ACTIVE) */ {
gus_halt_out_dma(sc);
}
@@ -660,8 +640,7 @@ int gusvocintrcnt;
#endif
int
-gusintr(arg)
- void *arg;
+gusintr(void *arg)
{
struct gus_softc *sc = arg;
bus_space_tag_t iot = sc->sc_iot;
@@ -728,8 +707,7 @@ struct playcont {
int playcntr;
void
-gus_dmaout_timeout(arg)
- void *arg;
+gus_dmaout_timeout(void *arg)
{
struct gus_softc *sc = arg;
bus_space_tag_t iot = sc->sc_iot;
@@ -760,8 +738,7 @@ gus_dmaout_timeout(arg)
*/
int
-gus_dmaout_intr(sc)
- struct gus_softc *sc;
+gus_dmaout_intr(struct gus_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -781,8 +758,7 @@ gus_dmaout_intr(sc)
}
void
-gus_dmaout_dointr(sc)
- struct gus_softc *sc;
+gus_dmaout_dointr(struct gus_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -935,8 +911,7 @@ gus_dmaout_dointr(sc)
*/
int
-gus_voice_intr(sc)
- struct gus_softc *sc;
+gus_voice_intr(struct gus_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1078,9 +1053,7 @@ gus_voice_intr(sc)
}
void
-gus_start_playing(sc, bufno)
- struct gus_softc *sc;
- int bufno;
+gus_start_playing(struct gus_softc *sc, int bufno)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1158,9 +1131,7 @@ gus_start_playing(sc, bufno)
}
int
-gus_continue_playing(sc, voice)
- struct gus_softc *sc;
- int voice;
+gus_continue_playing(struct gus_softc *sc, int voice)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1259,11 +1230,8 @@ gus_continue_playing(sc, voice)
*/
void
-gusdmaout(sc, flags, gusaddr, buffaddr, length)
- struct gus_softc *sc;
- int flags, length;
- u_long gusaddr;
- caddr_t buffaddr;
+gusdmaout(struct gus_softc *sc, int flags, u_long gusaddr, caddr_t buffaddr,
+ int length)
{
unsigned char c = (unsigned char) flags;
bus_space_tag_t iot = sc->sc_iot;
@@ -1333,10 +1301,7 @@ gusdmaout(sc, flags, gusaddr, buffaddr, length)
*/
void
-gus_start_voice(sc, voice, intrs)
- struct gus_softc *sc;
- int voice;
- int intrs;
+gus_start_voice(struct gus_softc *sc, int voice, int intrs)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1430,10 +1395,7 @@ gus_start_voice(sc, voice, intrs)
*/
void
-gus_stop_voice(sc, voice, intrs_too)
- struct gus_softc *sc;
- int voice;
- int intrs_too;
+gus_stop_voice(struct gus_softc *sc, int voice, int intrs_too)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1473,9 +1435,7 @@ gus_stop_voice(sc, voice, intrs_too)
* Set the volume of a given voice. Called at splaudio().
*/
void
-gus_set_volume(sc, voice, volume)
- struct gus_softc *sc;
- int voice, volume;
+gus_set_volume(struct gus_softc *sc, int voice, int volume)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1505,10 +1465,8 @@ gus_set_volume(sc, voice, volume)
*/
int
-gusmax_set_params(addr, setmode, usemode, p, r)
- void *addr;
- int setmode, usemode;
- struct audio_params *p, *r;
+gusmax_set_params(void *addr, int setmode, int usemode, struct audio_params *p,
+ struct audio_params *r)
{
struct ad1848_softc *ac = addr;
struct gus_softc *sc = ac->parent;
@@ -1522,10 +1480,8 @@ gusmax_set_params(addr, setmode, usemode, p, r)
}
int
-gus_set_params(addr, setmode, usemode, p, r)
- void *addr;
- int setmode, usemode;
- struct audio_params *p, *r;
+gus_set_params(void *addr, int setmode, int usemode, struct audio_params *p,
+ struct audio_params *r)
{
struct gus_softc *sc = addr;
@@ -1592,9 +1548,7 @@ gus_set_params(addr, setmode, usemode, p, r)
*/
int
-gusmax_round_blocksize(addr, blocksize)
- void * addr;
- int blocksize;
+gusmax_round_blocksize(void *addr, int blocksize)
{
struct ad1848_softc *ac = addr;
struct gus_softc *sc = ac->parent;
@@ -1640,8 +1594,7 @@ gus_round_blocksize(addr, blocksize)
}
int
-gus_get_out_gain(addr)
- caddr_t addr;
+gus_get_out_gain(caddr_t addr)
{
struct gus_softc *sc = (struct gus_softc *) addr;
@@ -1649,9 +1602,8 @@ gus_get_out_gain(addr)
return sc->sc_ogain / 2;
}
-inline void gus_set_voices(sc, voices)
-struct gus_softc *sc;
-int voices;
+inline void
+gus_set_voices(struct gus_softc *sc, int voices)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1670,8 +1622,7 @@ int voices;
*/
int
-gusmax_commit_settings(addr)
- void * addr;
+gusmax_commit_settings(void *addr)
{
struct ad1848_softc *ac = addr;
struct gus_softc *sc = ac->parent;
@@ -1687,8 +1638,7 @@ gusmax_commit_settings(addr)
* Commit the settings. Called at normal IPL.
*/
int
-gus_commit_settings(addr)
- void * addr;
+gus_commit_settings(void *addr)
{
struct gus_softc *sc = addr;
@@ -1710,8 +1660,7 @@ gus_commit_settings(addr)
}
void
-gus_set_chan_addrs(sc)
-struct gus_softc *sc;
+gus_set_chan_addrs(struct gus_softc *sc)
{
/*
* We use sc_nbufs * blocksize bytes of storage in the on-board GUS
@@ -1748,9 +1697,7 @@ struct gus_softc *sc;
*/
void
-gus_set_samprate(sc, voice, freq)
- struct gus_softc *sc;
- int voice, freq;
+gus_set_samprate(struct gus_softc *sc, int voice, int freq)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1787,9 +1734,7 @@ gus_set_samprate(sc, voice, freq)
*/
void
-gus_set_recrate(sc, rate)
- struct gus_softc *sc;
- u_long rate;
+gus_set_recrate(struct gus_softc *sc, u_long rate)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1811,18 +1756,14 @@ gus_set_recrate(sc, rate)
*/
int
-gusmax_speaker_ctl(addr, newstate)
- void * addr;
- int newstate;
+gusmax_speaker_ctl(void *addr, int newstate)
{
struct ad1848_softc *sc = addr;
return gus_speaker_ctl(sc->parent, newstate);
}
int
-gus_speaker_ctl(addr, newstate)
- void * addr;
- int newstate;
+gus_speaker_ctl(void *addr, int newstate)
{
struct gus_softc *sc = (struct gus_softc *) addr;
bus_space_tag_t iot = sc->sc_iot;
@@ -1844,9 +1785,7 @@ gus_speaker_ctl(addr, newstate)
}
int
-gus_linein_ctl(addr, newstate)
- void * addr;
- int newstate;
+gus_linein_ctl(void *addr, int newstate)
{
struct gus_softc *sc = (struct gus_softc *) addr;
bus_space_tag_t iot = sc->sc_iot;
@@ -1868,9 +1807,7 @@ gus_linein_ctl(addr, newstate)
}
int
-gus_mic_ctl(addr, newstate)
- void * addr;
- int newstate;
+gus_mic_ctl(void *addr, int newstate)
{
struct gus_softc *sc = (struct gus_softc *) addr;
bus_space_tag_t iot = sc->sc_iot;
@@ -1896,10 +1833,7 @@ gus_mic_ctl(addr, newstate)
*/
void
-gus_set_endaddr(sc, voice, addr)
- struct gus_softc *sc;
- int voice;
- u_long addr;
+gus_set_endaddr(struct gus_softc *sc, int voice, u_long addr)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1921,10 +1855,7 @@ gus_set_endaddr(sc, voice, addr)
* Set current address. Called at splaudio().
*/
void
-gus_set_curaddr(sc, voice, addr)
- struct gus_softc *sc;
- int voice;
- u_long addr;
+gus_set_curaddr(struct gus_softc *sc, int voice, u_long addr)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1947,9 +1878,7 @@ gus_set_curaddr(sc, voice, addr)
* Get current GUS playback address. Called at splaudio().
*/
u_long
-gus_get_curaddr(sc, voice)
- struct gus_softc *sc;
- int voice;
+gus_get_curaddr(struct gus_softc *sc, int voice)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh2 = sc->sc_ioh2;
@@ -1977,8 +1906,7 @@ gus_get_curaddr(sc, voice)
*/
u_long
-convert_to_16bit(address)
- u_long address;
+convert_to_16bit(u_long address)
{
u_long old_address;
@@ -1995,11 +1923,8 @@ convert_to_16bit(address)
*/
void
-guspoke(iot, ioh2, address, value)
- bus_space_tag_t iot;
- bus_space_handle_t ioh2;
- long address;
- unsigned char value;
+guspoke(bus_space_tag_t iot, bus_space_handle_t ioh2, long address,
+ unsigned char value)
{
/*
@@ -2023,10 +1948,7 @@ guspoke(iot, ioh2, address, value)
*/
unsigned char
-guspeek(iot, ioh2, address)
- bus_space_tag_t iot;
- bus_space_handle_t ioh2;
- u_long address;
+guspeek(bus_space_tag_t iot, bus_space_handle_t ioh2, u_long address)
{
/*
@@ -2050,9 +1972,7 @@ guspeek(iot, ioh2, address)
*/
void
-gusreset(sc, voices)
- struct gus_softc *sc;
- int voices;
+gusreset(struct gus_softc *sc, int voices)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh1 = sc->sc_ioh1;
@@ -2182,8 +2102,7 @@ gusreset(sc, voices)
int
-gus_init_cs4231(sc)
- struct gus_softc *sc;
+gus_init_cs4231(struct gus_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh1 = sc->sc_ioh1;
@@ -2235,9 +2154,7 @@ gus_init_cs4231(sc)
*/
int
-gus_getdev(addr, dev)
- void * addr;
- struct audio_device *dev;
+gus_getdev(void *addr, struct audio_device *dev)
{
*dev = gus_device;
return 0;
@@ -2248,30 +2165,22 @@ gus_getdev(addr, dev)
*/
int
-gus_set_in_gain(addr, gain, balance)
- caddr_t addr;
- u_int gain;
- u_char balance;
+gus_set_in_gain(caddr_t addr, u_int gain, u_char balance)
{
DPRINTF(("gus_set_in_gain called\n"));
return 0;
}
int
-gus_get_in_gain(addr)
- caddr_t addr;
+gus_get_in_gain(caddr_t addr)
{
DPRINTF(("gus_get_in_gain called\n"));
return 0;
}
int
-gusmax_dma_input(addr, buf, size, callback, arg)
- void * addr;
- void *buf;
- int size;
- void (*callback)(void *);
- void *arg;
+gusmax_dma_input(void *addr, void *buf, int size, void (*callback)(void *),
+ void *arg)
{
struct ad1848_softc *sc = addr;
return gus_dma_input(sc->parent, buf, size, callback, arg);
@@ -2282,12 +2191,8 @@ gusmax_dma_input(addr, buf, size, callback, arg)
* Called at splaudio(), either from top-half or from interrupt handler.
*/
int
-gus_dma_input(addr, buf, size, callback, arg)
- void * addr;
- void *buf;
- int size;
- void (*callback)(void *);
- void *arg;
+gus_dma_input(void *addr, void *buf, int size, void (*callback)(void *),
+ void *arg)
{
struct gus_softc *sc = addr;
bus_space_tag_t iot = sc->sc_iot;
@@ -2335,8 +2240,7 @@ gus_dma_input(addr, buf, size, callback, arg)
}
int
-gus_dmain_intr(sc)
- struct gus_softc *sc;
+gus_dmain_intr(struct gus_softc *sc)
{
void (*callback)(void *);
void *arg;
@@ -2363,8 +2267,7 @@ gus_dmain_intr(sc)
}
int
-gusmax_halt_out_dma(addr)
- void * addr;
+gusmax_halt_out_dma(void *addr)
{
struct ad1848_softc *sc = addr;
return gus_halt_out_dma(sc->parent);
@@ -2372,8 +2275,7 @@ gusmax_halt_out_dma(addr)
int
-gusmax_halt_in_dma(addr)
- void * addr;
+gusmax_halt_in_dma(void *addr)
{
struct ad1848_softc *sc = addr;
return gus_halt_in_dma(sc->parent);
@@ -2383,8 +2285,7 @@ gusmax_halt_in_dma(addr)
* Stop any DMA output. Called at splaudio().
*/
int
-gus_halt_out_dma(addr)
- void * addr;
+gus_halt_out_dma(void *addr)
{
struct gus_softc *sc = addr;
bus_space_tag_t iot = sc->sc_iot;
@@ -2420,8 +2321,7 @@ gus_halt_out_dma(addr)
* Stop any DMA output. Called at splaudio().
*/
int
-gus_halt_in_dma(addr)
- void * addr;
+gus_halt_in_dma(void *addr)
{
struct gus_softc *sc = addr;
bus_space_tag_t iot = sc->sc_iot;
@@ -2468,9 +2368,7 @@ ad1848_devmap_t gusmapping[] = {
int nummap = sizeof(gusmapping) / sizeof(gusmapping[0]);
int
-gusmax_mixer_get_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+gusmax_mixer_get_port(void *addr, mixer_ctrl_t *cp)
{
struct ad1848_softc *ac = addr;
struct gus_softc *sc = ac->parent;
@@ -2509,9 +2407,7 @@ gusmax_mixer_get_port(addr, cp)
}
int
-gus_mixer_get_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+gus_mixer_get_port(void *addr, mixer_ctrl_t *cp)
{
struct gus_softc *sc = addr;
struct ics2101_softc *ic = &sc->sc_mixer;
@@ -2634,54 +2530,42 @@ gus_mixer_get_port(addr, cp)
}
void
-gusics_master_mute(ic, mute)
- struct ics2101_softc *ic;
- int mute;
+gusics_master_mute(struct ics2101_softc *ic, int mute)
{
ics2101_mix_mute(ic, GUSMIX_CHAN_MASTER, ICSMIX_LEFT, mute);
ics2101_mix_mute(ic, GUSMIX_CHAN_MASTER, ICSMIX_RIGHT, mute);
}
void
-gusics_mic_mute(ic, mute)
- struct ics2101_softc *ic;
- int mute;
+gusics_mic_mute(struct ics2101_softc *ic, int mute)
{
ics2101_mix_mute(ic, GUSMIX_CHAN_MIC, ICSMIX_LEFT, mute);
ics2101_mix_mute(ic, GUSMIX_CHAN_MIC, ICSMIX_RIGHT, mute);
}
void
-gusics_linein_mute(ic, mute)
- struct ics2101_softc *ic;
- int mute;
+gusics_linein_mute(struct ics2101_softc *ic, int mute)
{
ics2101_mix_mute(ic, GUSMIX_CHAN_LINE, ICSMIX_LEFT, mute);
ics2101_mix_mute(ic, GUSMIX_CHAN_LINE, ICSMIX_RIGHT, mute);
}
void
-gusics_cd_mute(ic, mute)
- struct ics2101_softc *ic;
- int mute;
+gusics_cd_mute(struct ics2101_softc *ic, int mute)
{
ics2101_mix_mute(ic, GUSMIX_CHAN_CD, ICSMIX_LEFT, mute);
ics2101_mix_mute(ic, GUSMIX_CHAN_CD, ICSMIX_RIGHT, mute);
}
void
-gusics_dac_mute(ic, mute)
- struct ics2101_softc *ic;
- int mute;
+gusics_dac_mute(struct ics2101_softc *ic, int mute)
{
ics2101_mix_mute(ic, GUSMIX_CHAN_DAC, ICSMIX_LEFT, mute);
ics2101_mix_mute(ic, GUSMIX_CHAN_DAC, ICSMIX_RIGHT, mute);
}
int
-gusmax_mixer_set_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+gusmax_mixer_set_port(void *addr, mixer_ctrl_t *cp)
{
struct ad1848_softc *ac = addr;
struct gus_softc *sc = ac->parent;
@@ -2720,9 +2604,7 @@ gusmax_mixer_set_port(addr, cp)
}
int
-gus_mixer_set_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+gus_mixer_set_port(void *addr, mixer_ctrl_t *cp)
{
struct gus_softc *sc = addr;
struct ics2101_softc *ic = &sc->sc_mixer;
@@ -2880,8 +2762,7 @@ gus_mixer_set_port(addr, cp)
}
int
-gus_get_props(addr)
- void *addr;
+gus_get_props(void *addr)
{
struct gus_softc *sc = addr;
return AUDIO_PROP_MMAP |
@@ -2889,17 +2770,14 @@ gus_get_props(addr)
}
int
-gusmax_get_props(addr)
- void *addr;
+gusmax_get_props(void *addr)
{
struct ad1848_softc *ac = addr;
return gus_get_props(ac->parent);
}
int
-gusmax_mixer_query_devinfo(addr, dip)
- void *addr;
- mixer_devinfo_t *dip;
+gusmax_mixer_query_devinfo(void *addr, mixer_devinfo_t *dip)
{
DPRINTF(("gusmax_query_devinfo: index=%d\n", dip->index));
@@ -3113,9 +2991,7 @@ gusmax_mixer_query_devinfo(addr, dip)
}
int
-gus_mixer_query_devinfo(addr, dip)
- void *addr;
- mixer_devinfo_t *dip;
+gus_mixer_query_devinfo(void *addr, mixer_devinfo_t *dip)
{
struct gus_softc *sc = addr;
@@ -3268,9 +3144,7 @@ mute:
}
int
-gus_query_encoding(addr, fp)
- void *addr;
- struct audio_encoding *fp;
+gus_query_encoding(void *addr, struct audio_encoding *fp)
{
switch (fp->index) {
case 0:
@@ -3338,8 +3212,7 @@ gus_query_encoding(addr, fp)
*/
void
-gus_init_ics2101(sc)
- struct gus_softc *sc;
+gus_init_ics2101(struct gus_softc *sc)
{
struct ics2101_softc *ic = &sc->sc_mixer;
sc->sc_mixer.sc_iot = sc->sc_iot;
@@ -3419,9 +3292,7 @@ gus_init_ics2101(sc)
void
-gus_subattach(sc, ia)
- struct gus_softc *sc;
- struct isa_attach_args *ia;
+gus_subattach(struct gus_softc *sc, struct isa_attach_args *ia)
{
int i;
bus_space_tag_t iot;
@@ -3639,9 +3510,7 @@ gus_subattach(sc, ia)
*/
int
-gus_test_iobase (iot, iobase)
- bus_space_tag_t iot;
- int iobase;
+gus_test_iobase (bus_space_tag_t iot, int iobase)
{
bus_space_handle_t ioh1, ioh2, ioh3, ioh4;
u_char s1, s2;
diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c
index af75bb7cce4..d57413b5c3e 100644
--- a/sys/dev/isa/if_eg.c
+++ b/sys/dev/isa/if_eg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_eg.c,v 1.33 2013/08/07 01:06:32 bluhm Exp $ */
+/* $OpenBSD: if_eg.c,v 1.34 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
/*
@@ -137,8 +137,7 @@ static int egreadPCB(struct eg_softc *);
*/
static __inline void
-egprintpcb(sc)
- struct eg_softc *sc;
+egprintpcb(struct eg_softc *sc)
{
int i;
@@ -148,8 +147,7 @@ egprintpcb(sc)
static __inline void
-egprintstat(b)
- u_char b;
+egprintstat(u_char b)
{
DPRINTF(("%s %s %s %s %s %s %s\n",
(b & EG_STAT_HCRE)?"HCRE":"",
@@ -162,9 +160,7 @@ egprintstat(b)
}
static int
-egoutPCB(sc, b)
- struct eg_softc *sc;
- u_char b;
+egoutPCB(struct eg_softc *sc, u_char b)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -182,9 +178,7 @@ egoutPCB(sc, b)
}
static int
-egreadPCBstat(sc, statb)
- struct eg_softc *sc;
- u_char statb;
+egreadPCBstat(struct eg_softc *sc, u_char statb)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -202,8 +196,7 @@ egreadPCBstat(sc, statb)
}
static int
-egreadPCBready(sc)
- struct eg_softc *sc;
+egreadPCBready(struct eg_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -220,8 +213,7 @@ egreadPCBready(sc)
}
static int
-egwritePCB(sc)
- struct eg_softc *sc;
+egwritePCB(struct eg_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -254,8 +246,7 @@ egwritePCB(sc)
}
static int
-egreadPCB(sc)
- struct eg_softc *sc;
+egreadPCB(struct eg_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -309,9 +300,7 @@ egreadPCB(sc)
*/
int
-egprobe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+egprobe(struct device *parent, void *match, void *aux)
{
struct eg_softc *sc = match;
struct isa_attach_args *ia = aux;
@@ -374,9 +363,7 @@ lose:
}
void
-egattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+egattach(struct device *parent, struct device *self, void *aux)
{
struct eg_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
@@ -451,8 +438,7 @@ egattach(parent, self, aux)
}
void
-eginit(sc)
- register struct eg_softc *sc;
+eginit(register struct eg_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
@@ -501,10 +487,8 @@ eginit(sc)
}
void
-egrecv(sc)
- struct eg_softc *sc;
+egrecv(struct eg_softc *sc)
{
-
while (sc->eg_incount < EG_INLEN) {
sc->eg_pcb[0] = EG_CMD_RECVPACKET;
sc->eg_pcb[1] = 0x08;
@@ -523,8 +507,7 @@ egrecv(sc)
}
void
-egstart(ifp)
- struct ifnet *ifp;
+egstart(struct ifnet *ifp)
{
struct eg_softc *sc = ifp->if_softc;
bus_space_tag_t bst = sc->sc_bst;
@@ -602,8 +585,7 @@ loop:
}
int
-egintr(arg)
- void *arg;
+egintr(void *arg)
{
struct eg_softc *sc = arg;
bus_space_tag_t bst = sc->sc_bst;
@@ -689,10 +671,7 @@ egintr(arg)
* Pass a packet up to the higher levels.
*/
void
-egread(sc, buf, len)
- struct eg_softc *sc;
- caddr_t buf;
- int len;
+egread(struct eg_softc *sc, caddr_t buf, int len)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
struct mbuf *m;
@@ -730,10 +709,7 @@ egread(sc, buf, len)
* convert buf into mbufs
*/
struct mbuf *
-egget(sc, buf, totlen)
- struct eg_softc *sc;
- caddr_t buf;
- int totlen;
+egget(struct eg_softc *sc, caddr_t buf, int totlen)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
struct mbuf *top, **mp, *m;
@@ -774,10 +750,7 @@ egget(sc, buf, totlen)
}
int
-egioctl(ifp, cmd, data)
- register struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
+egioctl(register struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct eg_softc *sc = ifp->if_softc;
struct ifaddr *ifa = (struct ifaddr *)data;
@@ -840,8 +813,7 @@ egioctl(ifp, cmd, data)
}
void
-egreset(sc)
- struct eg_softc *sc;
+egreset(struct eg_softc *sc)
{
int s;
@@ -853,8 +825,7 @@ egreset(sc)
}
void
-egwatchdog(ifp)
- struct ifnet *ifp;
+egwatchdog(struct ifnet *ifp)
{
struct eg_softc *sc = ifp->if_softc;
@@ -865,8 +836,7 @@ egwatchdog(ifp)
}
void
-egstop(sc)
- register struct eg_softc *sc;
+egstop(register struct eg_softc *sc)
{
bus_space_tag_t bst = sc->sc_bst;
bus_space_handle_t bsh = sc->sc_bsh;
diff --git a/sys/dev/isa/if_ep_isa.c b/sys/dev/isa/if_ep_isa.c
index c7913c08dc6..1607bafd7f8 100644
--- a/sys/dev/isa/if_ep_isa.c
+++ b/sys/dev/isa/if_ep_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ep_isa.c,v 1.26 2013/08/07 01:06:32 bluhm Exp $ */
+/* $OpenBSD: if_ep_isa.c,v 1.27 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: if_ep_isa.c,v 1.5 1996/05/12 23:52:36 mycroft Exp $ */
/*
@@ -116,11 +116,8 @@ static struct epcard {
static int nepcards;
static void
-epaddcard(bus, iobase, irq, model)
- int bus, iobase, irq;
- u_short model;
+epaddcard(int bus, int iobase, int irq, u_short model)
{
-
if (nepcards >= MAXEPCARDS)
return;
epcards[nepcards].bus = bus;
@@ -139,9 +136,7 @@ epaddcard(bus, iobase, irq, model)
* calls we look for matching cards.
*/
int
-ep_isa_probe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ep_isa_probe(struct device *parent, void *match, void *aux)
{
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
@@ -258,9 +253,7 @@ good:
}
void
-ep_isa_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ep_isa_attach(struct device *parent, struct device *self, void *aux)
{
struct ep_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
diff --git a/sys/dev/isa/if_ep_isapnp.c b/sys/dev/isa/if_ep_isapnp.c
index 9c2c711efb4..eda3943bc83 100644
--- a/sys/dev/isa/if_ep_isapnp.c
+++ b/sys/dev/isa/if_ep_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ep_isapnp.c,v 1.12 2013/08/07 01:06:32 bluhm Exp $ */
+/* $OpenBSD: if_ep_isapnp.c,v 1.13 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: if_ep_isapnp.c,v 1.5 1996/05/12 23:52:36 mycroft Exp $ */
/*
@@ -95,18 +95,14 @@ struct cfattach ep_isapnp_ca = {
* calls we look for matching cards.
*/
int
-ep_isapnp_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ep_isapnp_match(struct device *parent, void *match, void *aux)
{
/* XXX This should be more intelligent */
return 1;
}
void
-ep_isapnp_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ep_isapnp_attach(struct device *parent, struct device *self, void *aux)
{
struct ep_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
diff --git a/sys/dev/isa/isapnpres.c b/sys/dev/isa/isapnpres.c
index 2dd8b592e90..a45b0c654e4 100644
--- a/sys/dev/isa/isapnpres.c
+++ b/sys/dev/isa/isapnpres.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isapnpres.c,v 1.7 2010/06/24 21:17:59 jasper Exp $ */
+/* $OpenBSD: isapnpres.c,v 1.8 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: isapnpres.c,v 1.7.4.1 1997/11/20 07:46:13 mellon Exp $ */
/*
@@ -68,8 +68,7 @@ int isapnp_process_tag(u_char, u_char, u_char *,
* Wait for the next byte of resource data to become available
*/
int
-isapnp_wait_status(sc)
- struct isapnp_softc *sc;
+isapnp_wait_status(struct isapnp_softc *sc)
{
int i;
@@ -88,8 +87,7 @@ isapnp_wait_status(sc)
* resources of the current card if needed.
*/
struct isa_attach_args *
-isapnp_newdev(card)
- struct isa_attach_args *card;
+isapnp_newdev(struct isa_attach_args *card)
{
struct isa_attach_args *ipa, *dev = malloc(sizeof(*dev), M_DEVBUF, M_WAITOK);
@@ -117,8 +115,7 @@ isapnp_newdev(card)
* Add a new alternate configuration to a logical device
*/
struct isa_attach_args *
-isapnp_newconf(dev)
- struct isa_attach_args *dev;
+isapnp_newconf(struct isa_attach_args *dev)
{
struct isa_attach_args *ipa, *conf = malloc(sizeof(*conf), M_DEVBUF, M_WAITOK);
@@ -150,9 +147,7 @@ isapnp_newconf(dev)
* Merge the common device configurations to the subconfigurations
*/
void
-isapnp_merge(c, d)
- struct isa_attach_args *c;
- const struct isa_attach_args *d;
+isapnp_merge(struct isa_attach_args *c, const struct isa_attach_args *d)
{
int i;
@@ -177,8 +172,7 @@ isapnp_merge(c, d)
* Flatten the tree to a list of config entries.
*/
struct isa_attach_args *
-isapnp_flatten(card)
- struct isa_attach_args *card;
+isapnp_flatten(struct isa_attach_args *card)
{
struct isa_attach_args *dev, *conf, *d, *c, *pa;
@@ -223,9 +217,9 @@ isapnp_flatten(card)
* Process a resource tag
*/
int
-isapnp_process_tag(tag, len, buf, card, dev, conf)
- u_char tag, len, *buf;
- struct isa_attach_args **card, **dev, **conf;
+isapnp_process_tag(u_char tag, u_char len, u_char *buf,
+ struct isa_attach_args **card, struct isa_attach_args **dev,
+ struct isa_attach_args **conf)
{
char str[64];
struct isapnp_region *r;
@@ -437,10 +431,8 @@ isapnp_process_tag(tag, len, buf, card, dev, conf)
* Read the resources for card c
*/
struct isa_attach_args *
-isapnp_get_resource(sc, c, template)
- struct isapnp_softc *sc;
- int c;
- struct isa_attach_args *template;
+isapnp_get_resource(struct isapnp_softc *sc, int c,
+ struct isa_attach_args *template)
{
u_char d, tag;
u_short len;
diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c
index b66ab4fe396..d421a62a07d 100644
--- a/sys/dev/isa/wds.c
+++ b/sys/dev/isa/wds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wds.c,v 1.39 2011/06/29 12:17:40 tedu Exp $ */
+/* $OpenBSD: wds.c,v 1.40 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */
#undef WDSDIAG
@@ -191,12 +191,8 @@ struct cfdriver wds_cd = {
#define WDS_ABORT_TIMEOUT 2000 /* time to wait for abort (mSec) */
integrate void
-wds_wait(iot, ioh, port, mask, val)
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
- int port;
- int mask;
- int val;
+wds_wait(bus_space_tag_t iot, bus_space_handle_t ioh, int port, int mask,
+ int val)
{
while ((bus_space_read_1(iot, ioh, port) & mask) != val)
;
@@ -206,10 +202,7 @@ wds_wait(iot, ioh, port, mask, val)
* Write a command to the board's I/O ports.
*/
int
-wds_cmd(sc, ibuf, icnt)
- struct wds_softc *sc;
- u_int8_t *ibuf;
- int icnt;
+wds_cmd(struct wds_softc *sc, u_int8_t *ibuf, int icnt)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -232,9 +225,7 @@ wds_cmd(sc, ibuf, icnt)
* Check for the presence of a WD7000 SCSI controller.
*/
int
-wdsprobe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+wdsprobe(struct device *parent, void *match, void *aux)
{
register struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
@@ -258,11 +249,8 @@ wdsprobe(parent, match, aux)
}
int
-wdsprint(aux, name)
- void *aux;
- const char *name;
+wdsprint(void *aux, const char *name)
{
-
if (name != NULL)
printf("%s: scsibus ", name);
return UNCONF;
@@ -272,9 +260,7 @@ wdsprint(aux, name)
* Attach all available units.
*/
void
-wdsattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+wdsattach(struct device *parent, struct device *self, void *aux)
{
struct isa_attach_args *ia = aux;
struct wds_softc *sc = (void *)self;
@@ -326,8 +312,7 @@ wdsattach(parent, self, aux)
}
integrate void
-wds_finish_scbs(sc)
- struct wds_softc *sc;
+wds_finish_scbs(struct wds_softc *sc)
{
struct wds_mbx_in *wmbi;
struct wds_scb *scb;
@@ -386,8 +371,7 @@ AGAIN:
* Process an interrupt.
*/
int
-wdsintr(arg)
- void *arg;
+wdsintr(void *arg)
{
struct wds_softc *sc = arg;
bus_space_tag_t iot = sc->sc_iot;
@@ -423,11 +407,8 @@ wdsintr(arg)
}
integrate void
-wds_reset_scb(sc, scb)
- struct wds_softc *sc;
- struct wds_scb *scb;
+wds_reset_scb(struct wds_softc *sc, struct wds_scb *scb)
{
-
scb->flags = 0;
}
@@ -435,8 +416,7 @@ wds_reset_scb(sc, scb)
* Free the command structure, the outgoing mailbox and the data buffer.
*/
void
-wds_scb_free(xsc, xscb)
- void *xsc, *xscb;
+wds_scb_free(void *xsc, void *xscb)
{
struct wds_softc *sc = xsc;
struct wds_scb *scb = xscb;
@@ -453,9 +433,7 @@ wds_scb_free(xsc, xscb)
}
void
-wds_free_buf(sc, buf)
- struct wds_softc *sc;
- struct wds_buf *buf;
+wds_free_buf(struct wds_softc *sc, struct wds_buf *buf)
{
int s;
@@ -475,9 +453,7 @@ wds_free_buf(sc, buf)
}
integrate void
-wds_init_scb(sc, scb)
- struct wds_softc *sc;
- struct wds_scb *scb;
+wds_init_scb(struct wds_softc *sc, struct wds_scb *scb)
{
int hashnum;
@@ -497,8 +473,7 @@ wds_init_scb(sc, scb)
* Get a free scb
*/
void *
-wds_scb_alloc(xsc)
- void *xsc;
+wds_scb_alloc(void *xsc)
{
struct wds_softc *sc = xsc;
struct wds_scb *scb;
@@ -515,9 +490,7 @@ wds_scb_alloc(xsc)
}
struct wds_buf *
-wds_get_buf(sc, flags)
- struct wds_softc *sc;
- int flags;
+wds_get_buf(struct wds_softc *sc, int flags)
{
struct wds_buf *buf;
int s;
@@ -543,9 +516,7 @@ out:
}
struct wds_scb *
-wds_scb_phys_kv(sc, scb_phys)
- struct wds_softc *sc;
- u_long scb_phys;
+wds_scb_phys_kv(struct wds_softc *sc, u_long scb_phys)
{
int hashnum = SCB_HASH(scb_phys);
struct wds_scb *scb = sc->sc_scbhash[hashnum];
@@ -565,11 +536,8 @@ wds_scb_phys_kv(sc, scb_phys)
* Queue a SCB to be sent to the controller, and send it if possible.
*/
void
-wds_queue_scb(sc, scb)
- struct wds_softc *sc;
- struct wds_scb *scb;
+wds_queue_scb(struct wds_softc *sc, struct wds_scb *scb)
{
-
TAILQ_INSERT_TAIL(&sc->sc_waiting_scb, scb, chain);
wds_start_scbs(sc);
}
@@ -578,8 +546,7 @@ wds_queue_scb(sc, scb)
* Garbage collect mailboxes that are no longer in use.
*/
void
-wds_collect_mbo(sc)
- struct wds_softc *sc;
+wds_collect_mbo(struct wds_softc *sc)
{
struct wds_mbx_out *wmbo; /* Mail Box Out pointer */
#ifdef WDSDIAG
@@ -608,8 +575,7 @@ wds_collect_mbo(sc)
* Send as many SCBs as we have empty mailboxes for.
*/
void
-wds_start_scbs(sc)
- struct wds_softc *sc;
+wds_start_scbs(struct wds_softc *sc)
{
struct wds_mbx_out *wmbo; /* Mail Box Out pointer */
struct wds_scb *scb;
@@ -659,10 +625,7 @@ wds_start_scbs(sc)
* Process the result of a SCSI command.
*/
void
-wds_done(sc, scb, stat)
- struct wds_softc *sc;
- struct wds_scb *scb;
- u_int8_t stat;
+wds_done(struct wds_softc *sc, struct wds_scb *scb, u_int8_t stat)
{
struct scsi_xfer *xs = scb->xs;
@@ -747,9 +710,7 @@ wds_done(sc, scb, stat)
}
int
-wds_find(ia, sc)
- struct isa_attach_args *ia;
- struct wds_softc *sc;
+wds_find(struct isa_attach_args *ia, struct wds_softc *sc)
{
bus_space_tag_t iot = ia->ia_iot;
bus_space_handle_t ioh = ia->ia_ioh;
@@ -819,8 +780,7 @@ ready:
* Initialise the board and driver.
*/
void
-wds_init(sc)
- struct wds_softc *sc;
+wds_init(struct wds_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -869,8 +829,7 @@ wds_init(sc)
* Read the board's firmware revision information.
*/
void
-wds_inquire_setup_information(sc)
- struct wds_softc *sc;
+wds_inquire_setup_information(struct wds_softc *sc)
{
struct wds_scb *scb;
u_char *j;
@@ -927,8 +886,7 @@ wdsminphys(struct buf *bp, struct scsi_link *sl)
* Send a SCSI command.
*/
void
-wds_scsi_cmd(xs)
- struct scsi_xfer *xs;
+wds_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
struct wds_softc *sc = sc_link->adapter_softc;
@@ -1096,9 +1054,7 @@ bad:
* Send a sense request.
*/
void
-wds_sense(sc, scb)
- struct wds_softc *sc;
- struct wds_scb *scb;
+wds_sense(struct wds_softc *sc, struct wds_scb *scb)
{
struct scsi_xfer *xs = scb->xs;
struct scsi_sense *ss = (void *)&scb->sense.scb;
@@ -1146,10 +1102,7 @@ wds_sense(sc, scb)
* Poll a particular unit, looking for a particular scb
*/
int
-wds_poll(sc, xs, count)
- struct wds_softc *sc;
- struct scsi_xfer *xs;
- int count;
+wds_poll(struct wds_softc *sc, struct scsi_xfer *xs, int count)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -1178,10 +1131,7 @@ wds_poll(sc, xs, count)
* Poll a particular unit, looking for a particular scb
*/
int
-wds_ipoll(sc, scb, count)
- struct wds_softc *sc;
- struct wds_scb *scb;
- int count;
+wds_ipoll(struct wds_softc *sc, struct wds_scb *scb, int count)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -1207,8 +1157,7 @@ wds_ipoll(sc, scb, count)
}
void
-wds_timeout(arg)
- void *arg;
+wds_timeout(void *arg)
{
struct wds_scb *scb = arg;
struct scsi_xfer *xs;
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index fa281b4d6de..051413f1ecf 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.33 2013/05/24 07:58:46 ratchov Exp $ */
+/* $OpenBSD: autri.c,v 1.34 2013/11/15 16:46:27 brad Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -195,40 +195,28 @@ struct midi_hw_if autri_midi_hw_if = {
* register set/clear bit
*/
static __inline void
-autri_reg_set_1(sc, no, mask)
- struct autri_softc *sc;
- int no;
- uint8_t mask;
+autri_reg_set_1(struct autri_softc *sc, int no, uint8_t mask)
{
bus_space_write_1(sc->memt, sc->memh, no,
(bus_space_read_1(sc->memt, sc->memh, no) | mask));
}
static __inline void
-autri_reg_clear_1(sc, no, mask)
- struct autri_softc *sc;
- int no;
- uint8_t mask;
+autri_reg_clear_1(struct autri_softc *sc, int no, uint8_t mask)
{
bus_space_write_1(sc->memt, sc->memh, no,
(bus_space_read_1(sc->memt, sc->memh, no) & ~mask));
}
static __inline void
-autri_reg_set_4(sc, no, mask)
- struct autri_softc *sc;
- int no;
- uint32_t mask;
+autri_reg_set_4(struct autri_softc *sc, int no, uint32_t mask)
{
bus_space_write_4(sc->memt, sc->memh, no,
(bus_space_read_4(sc->memt, sc->memh, no) | mask));
}
static __inline void
-autri_reg_clear_4(sc, no, mask)
- struct autri_softc *sc;
- int no;
- uint32_t mask;
+autri_reg_clear_4(struct autri_softc *sc, int no, uint32_t mask)
{
bus_space_write_4(sc->memt, sc->memh, no,
(bus_space_read_4(sc->memt, sc->memh, no) & ~mask));
@@ -238,9 +226,7 @@ autri_reg_clear_4(sc, no, mask)
* AC97 codec
*/
int
-autri_attach_codec(sc_, codec_if)
- void *sc_;
- struct ac97_codec_if *codec_if;
+autri_attach_codec(void *sc_, struct ac97_codec_if *codec_if)
{
struct autri_codec_softc *sc = sc_;
@@ -251,10 +237,7 @@ autri_attach_codec(sc_, codec_if)
}
int
-autri_read_codec(sc_, index, data)
- void *sc_;
- u_int8_t index;
- u_int16_t *data;
+autri_read_codec(void *sc_, u_int8_t index, u_int16_t *data)
{
struct autri_codec_softc *codec = sc_;
struct autri_softc *sc = codec->sc;
@@ -329,10 +312,7 @@ autri_read_codec(sc_, index, data)
}
int
-autri_write_codec(sc_, index, data)
- void *sc_;
- u_int8_t index;
- u_int16_t data;
+autri_write_codec(void *sc_, u_int8_t index, u_int16_t data)
{
struct autri_codec_softc *codec = sc_;
struct autri_softc *sc = codec->sc;
@@ -390,8 +370,7 @@ autri_write_codec(sc_, index, data)
}
void
-autri_reset_codec(sc_)
- void *sc_;
+autri_reset_codec(void *sc_)
{
struct autri_codec_softc *codec = sc_;
struct autri_softc *sc = codec->sc;
@@ -479,10 +458,7 @@ const struct pci_matchid autri_devices[] = {
};
int
-autri_match(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+autri_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = aux;
@@ -503,10 +479,7 @@ autri_match(parent, match, aux)
}
void
-autri_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+autri_attach(struct device *parent, struct device *self, void *aux)
{
struct autri_softc *sc = (struct autri_softc *)self;
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
@@ -642,8 +615,7 @@ autri_activate(struct device *self, int act)
}
int
-autri_init(sc_)
- void *sc_;
+autri_init(void *sc_)
{
struct autri_softc *sc = sc_;
pcireg_t reg;
@@ -762,8 +734,7 @@ autri_init(sc_)
}
void
-autri_enable_loop_interrupt(sc_)
- void *sc_;
+autri_enable_loop_interrupt(void *sc_)
{
struct autri_softc *sc = sc_;
u_int32_t reg;
@@ -779,8 +750,7 @@ autri_enable_loop_interrupt(sc_)
#if 0
void
-autri_disable_loop_interrupt(sc_)
- void *sc_;
+autri_disable_loop_interrupt(void *sc_)
{
struct autri_softc *sc = sc_;
u_int32_t reg;
@@ -791,8 +761,7 @@ autri_disable_loop_interrupt(sc_)
#endif
int
-autri_intr(p)
- void *p;
+autri_intr(void *p)
{
struct autri_softc *sc = p;
u_int32_t intsrc;
@@ -873,11 +842,8 @@ autri_intr(p)
*/
int
-autri_allocmem(sc, size, align, p)
- struct autri_softc *sc;
- size_t size;
- size_t align;
- struct autri_dma *p;
+autri_allocmem(struct autri_softc *sc, size_t size, size_t align,
+ struct autri_dma *p)
{
int error;
@@ -913,9 +879,7 @@ free:
}
int
-autri_freemem(sc, p)
- struct autri_softc *sc;
- struct autri_dma *p;
+autri_freemem(struct autri_softc *sc, struct autri_dma *p)
{
bus_dmamap_unload(sc->sc_dmatag, p->map);
bus_dmamap_destroy(sc->sc_dmatag, p->map);
@@ -925,9 +889,7 @@ autri_freemem(sc, p)
}
int
-autri_open(addr, flags)
- void *addr;
- int flags;
+autri_open(void *addr, int flags)
{
DPRINTF(("autri_open()\n"));
DPRINTFN(5,("MISCINT : 0x%08X\n",
@@ -938,16 +900,13 @@ autri_open(addr, flags)
}
void
-autri_close(addr)
- void *addr;
+autri_close(void *addr)
{
DPRINTF(("autri_close()\n"));
}
int
-autri_query_encoding(addr, fp)
- void *addr;
- struct audio_encoding *fp;
+autri_query_encoding(void *addr, struct audio_encoding *fp)
{
switch (fp->index) {
case 0:
@@ -1008,10 +967,8 @@ autri_query_encoding(addr, fp)
}
int
-autri_set_params(addr, setmode, usemode, play, rec)
- void *addr;
- int setmode, usemode;
- struct audio_params *play, *rec;
+autri_set_params(void *addr, int setmode, int usemode, struct audio_params *play,
+ struct audio_params *rec)
{
struct audio_params *p;
int mode;
@@ -1066,16 +1023,13 @@ autri_set_params(addr, setmode, usemode, play, rec)
}
int
-autri_round_blocksize(addr, block)
- void *addr;
- int block;
+autri_round_blocksize(void *addr, int block)
{
return ((block + 3) & -4);
}
int
-autri_halt_output(addr)
- void *addr;
+autri_halt_output(void *addr)
{
struct autri_softc *sc = addr;
@@ -1089,8 +1043,7 @@ autri_halt_output(addr)
}
int
-autri_halt_input(addr)
- void *addr;
+autri_halt_input(void *addr)
{
struct autri_softc *sc = addr;
@@ -1104,9 +1057,7 @@ autri_halt_input(addr)
}
int
-autri_getdev(addr, retp)
- void *addr;
- struct audio_device *retp;
+autri_getdev(void *addr, struct audio_device *retp)
{
struct autri_softc *sc = addr;
@@ -1137,9 +1088,7 @@ autri_getdev(addr, retp)
}
int
-autri_mixer_set_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+autri_mixer_set_port(void *addr, mixer_ctrl_t *cp)
{
struct autri_softc *sc = addr;
@@ -1148,9 +1097,7 @@ autri_mixer_set_port(addr, cp)
}
int
-autri_mixer_get_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+autri_mixer_get_port(void *addr, mixer_ctrl_t *cp)
{
struct autri_softc *sc = addr;
@@ -1159,9 +1106,7 @@ autri_mixer_get_port(addr, cp)
}
int
-autri_query_devinfo(addr, dip)
- void *addr;
- mixer_devinfo_t *dip;
+autri_query_devinfo(void *addr, mixer_devinfo_t *dip)
{
struct autri_softc *sc = addr;
@@ -1170,20 +1115,15 @@ autri_query_devinfo(addr, dip)
}
int
-autri_get_portnum_by_name(sc, class, device, qualifier)
- struct autri_softc *sc;
- char *class, *device, *qualifier;
+autri_get_portnum_by_name(struct autri_softc *sc, char *class, char *device,
+ char *qualifier)
{
return (sc->sc_codec.codec_if->vtbl->get_portnum_by_name(
sc->sc_codec.codec_if, class, device, qualifier));
}
void *
-autri_malloc(addr, direction, size, pool, flags)
- void *addr;
- int direction;
- size_t size;
- int pool, flags;
+autri_malloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct autri_softc *sc = addr;
struct autri_dma *p;
@@ -1208,10 +1148,7 @@ autri_malloc(addr, direction, size, pool, flags)
}
void
-autri_free(addr, ptr, pool)
- void *addr;
- void *ptr;
- int pool;
+autri_free(void *addr, void *ptr, int pool)
{
struct autri_softc *sc = addr;
struct autri_dma **pp, *p;
@@ -1227,9 +1164,7 @@ autri_free(addr, ptr, pool)
}
struct autri_dma *
-autri_find_dma(sc, addr)
- struct autri_softc *sc;
- void *addr;
+autri_find_dma(struct autri_softc *sc, void *addr)
{
struct autri_dma *p;
@@ -1240,11 +1175,7 @@ autri_find_dma(sc, addr)
}
paddr_t
-autri_mappage(addr, mem, off, prot)
- void *addr;
- void *mem;
- off_t off;
- int prot;
+autri_mappage(void *addr, void *mem, off_t off, int prot)
{
struct autri_softc *sc = addr;
struct autri_dma *p;
@@ -1261,18 +1192,14 @@ autri_mappage(addr, mem, off, prot)
}
int
-autri_get_props(addr)
- void *addr;
+autri_get_props(void *addr)
{
return (AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
AUDIO_PROP_FULLDUPLEX);
}
void
-autri_setup_channel(sc, mode, param)
- struct autri_softc *sc;
- int mode;
- struct audio_params *param;
+autri_setup_channel(struct autri_softc *sc, int mode, struct audio_params *param)
{
int i, ch, channel;
u_int32_t reg, cr[5];
@@ -1405,13 +1332,8 @@ autri_setup_channel(sc, mode, param)
}
int
-autri_trigger_output(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+autri_trigger_output(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct autri_softc *sc = addr;
struct autri_dma *p;
@@ -1450,13 +1372,7 @@ autri_trigger_output(addr, start, end, blksize, intr, arg, param)
}
int
-autri_trigger_input(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+autri_trigger_input(void *addr, void *start, void *end, int blksize, void (*intr)(void *), void *arg, struct audio_params *param)
{
struct autri_softc *sc = addr;
struct autri_dma *p;
@@ -1506,8 +1422,7 @@ autri_trigger_input(addr, start, end, blksize, intr, arg, param)
#if 0
int
-autri_halt(sc)
- struct autri_softc *sc;
+autri_halt(struct autri_softc *sc)
{
DPRINTF(("autri_halt().\n"));
/*autri_stopch(sc);*/
@@ -1518,9 +1433,7 @@ autri_halt(sc)
#endif
void
-autri_enable_interrupt(sc, ch)
- struct autri_softc *sc;
- int ch;
+autri_enable_interrupt(struct autri_softc *sc, int ch)
{
int reg;
@@ -1531,9 +1444,7 @@ autri_enable_interrupt(sc, ch)
}
void
-autri_disable_interrupt(sc, ch)
- struct autri_softc *sc;
- int ch;
+autri_disable_interrupt(struct autri_softc *sc, int ch)
{
int reg;
@@ -1544,9 +1455,7 @@ autri_disable_interrupt(sc, ch)
}
void
-autri_startch(sc, ch, ch_intr)
- struct autri_softc *sc;
- int ch, ch_intr;
+autri_startch(struct autri_softc *sc, int ch, int ch_intr)
{
int reg;
u_int32_t chmask;
@@ -1559,9 +1468,7 @@ autri_startch(sc, ch, ch_intr)
}
void
-autri_stopch(sc, ch, ch_intr)
- struct autri_softc *sc;
- int ch, ch_intr;
+autri_stopch(struct autri_softc *sc, int ch, int ch_intr)
{
int reg;
u_int32_t chmask;
@@ -1575,10 +1482,8 @@ autri_stopch(sc, ch, ch_intr)
#if NMIDI > 0
int
-autri_midi_open(void *addr, int flags,
- void (*iintr)(void *, int),
- void (*ointr)(void *),
- void *arg)
+autri_midi_open(void *addr, int flags, void (*iintr)(void *, int),
+ void (*ointr)(void *), void *arg)
{
struct autri_softc *sc = addr;
diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c
index b7bfa4d3827..1900c5f9996 100644
--- a/sys/dev/pci/fms.c
+++ b/sys/dev/pci/fms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fms.c,v 1.24 2013/05/24 07:58:46 ratchov Exp $ */
+/* $OpenBSD: fms.c,v 1.25 2013/11/15 16:46:27 brad Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
@@ -153,10 +153,7 @@ int fms_allocmem(struct fms_softc *, size_t, size_t,
int fms_freemem(struct fms_softc *, struct fms_dma *);
int
-fms_match(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+fms_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *) aux;
@@ -167,10 +164,7 @@ fms_match(parent, match, aux)
}
void
-fms_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+fms_attach(struct device *parent, struct device *self, void *aux)
{
struct pci_attach_args *pa = aux;
struct fms_softc *sc = (struct fms_softc *) self;
@@ -300,10 +294,7 @@ fms_attach(parent, self, aux)
*/
#define TIMO 50
int
-fms_read_codec(addr, reg, val)
- void *addr;
- u_int8_t reg;
- u_int16_t *val;
+fms_read_codec(void *addr, u_int8_t reg, u_int16_t *val)
{
struct fms_softc *sc = addr;
int i;
@@ -336,10 +327,7 @@ fms_read_codec(addr, reg, val)
}
int
-fms_write_codec(addr, reg, val)
- void *addr;
- u_int8_t reg;
- u_int16_t val;
+fms_write_codec(void *addr, u_int8_t reg, u_int16_t val)
{
struct fms_softc *sc = addr;
int i;
@@ -362,9 +350,7 @@ fms_write_codec(addr, reg, val)
#undef TIMO
int
-fms_attach_codec(addr, cif)
- void *addr;
- struct ac97_codec_if *cif;
+fms_attach_codec(void *addr, struct ac97_codec_if *cif)
{
struct fms_softc *sc = addr;
@@ -374,8 +360,7 @@ fms_attach_codec(addr, cif)
/* Cold Reset */
void
-fms_reset_codec(addr)
- void *addr;
+fms_reset_codec(void *addr)
{
struct fms_softc *sc = addr;
bus_space_write_2(sc->sc_iot, sc->sc_ioh, FM_CODEC_CTL, 0x0020);
@@ -385,8 +370,7 @@ fms_reset_codec(addr)
}
int
-fms_intr(arg)
- void *arg;
+fms_intr(void *arg)
{
struct fms_softc *sc = arg;
u_int16_t istat;
@@ -436,26 +420,21 @@ fms_intr(arg)
}
int
-fms_open(addr, flags)
- void *addr;
- int flags;
+fms_open(void *addr, int flags)
{
/* UNUSED struct fms_softc *sc = addr;*/
-
+
return 0;
}
void
-fms_close(addr)
- void *addr;
+fms_close(void *addr)
{
/* UNUSED struct fms_softc *sc = addr;*/
}
int
-fms_query_encoding(addr, fp)
- void *addr;
- struct audio_encoding *fp;
+fms_query_encoding(void *addr, struct audio_encoding *fp)
{
switch (fp->index) {
@@ -546,10 +525,8 @@ struct {
};
int
-fms_set_params(addr, setmode, usemode, play, rec)
- void *addr;
- int setmode, usemode;
- struct audio_params *play, *rec;
+fms_set_params(void *addr, int setmode, int usemode, struct audio_params *play,
+ struct audio_params *rec)
{
struct fms_softc *sc = addr;
int i;
@@ -648,16 +625,13 @@ fms_set_params(addr, setmode, usemode, play, rec)
}
int
-fms_round_blocksize(addr, blk)
- void *addr;
- int blk;
+fms_round_blocksize(void *addr, int blk)
{
return (blk + 0xf) & ~0xf;
}
int
-fms_halt_output(addr)
- void *addr;
+fms_halt_output(void *addr)
{
struct fms_softc *sc = addr;
u_int16_t k1;
@@ -672,8 +646,7 @@ fms_halt_output(addr)
}
int
-fms_halt_input(addr)
- void *addr;
+fms_halt_input(void *addr)
{
struct fms_softc *sc = addr;
u_int16_t k1;
@@ -688,18 +661,14 @@ fms_halt_input(addr)
}
int
-fms_getdev(addr, retp)
- void *addr;
- struct audio_device *retp;
+fms_getdev(void *addr, struct audio_device *retp)
{
*retp = fms_device;
return 0;
}
int
-fms_set_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+fms_set_port(void *addr, mixer_ctrl_t *cp)
{
struct fms_softc *sc = addr;
@@ -707,9 +676,7 @@ fms_set_port(addr, cp)
}
int
-fms_get_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+fms_get_port(void *addr, mixer_ctrl_t *cp)
{
struct fms_softc *sc = addr;
@@ -717,11 +684,7 @@ fms_get_port(addr, cp)
}
void *
-fms_malloc(addr, direction, size, pool, flags)
- void *addr;
- int direction;
- size_t size;
- int pool, flags;
+fms_malloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct fms_softc *sc = addr;
struct fms_dma *p;
@@ -779,10 +742,7 @@ fail_alloc:
}
void
-fms_free(addr, ptr, pool)
- void *addr;
- void *ptr;
- int pool;
+fms_free(void *addr, void *ptr, int pool)
{
struct fms_softc *sc = addr;
struct fms_dma **pp, *p;
@@ -803,11 +763,7 @@ fms_free(addr, ptr, pool)
}
paddr_t
-fms_mappage(addr, mem, off, prot)
- void *addr;
- void *mem;
- off_t off;
- int prot;
+fms_mappage(void *addr, void *mem, off_t off, int prot)
{
struct fms_softc *sc = addr;
struct fms_dma *p;
@@ -825,17 +781,14 @@ fms_mappage(addr, mem, off, prot)
}
int
-fms_get_props(addr)
- void *addr;
+fms_get_props(void *addr)
{
return AUDIO_PROP_MMAP | AUDIO_PROP_INDEPENDENT |
AUDIO_PROP_FULLDUPLEX;
}
int
-fms_query_devinfo(addr, dip)
- void *addr;
- mixer_devinfo_t *dip;
+fms_query_devinfo(void *addr, mixer_devinfo_t *dip)
{
struct fms_softc *sc = addr;
@@ -843,13 +796,8 @@ fms_query_devinfo(addr, dip)
}
int
-fms_trigger_output(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+fms_trigger_output(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct fms_softc *sc = addr;
struct fms_dma *p;
@@ -883,13 +831,8 @@ fms_trigger_output(addr, start, end, blksize, intr, arg, param)
int
-fms_trigger_input(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+fms_trigger_input(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct fms_softc *sc = addr;
struct fms_dma *p;
@@ -920,5 +863,3 @@ fms_trigger_input(addr, start, end, blksize, intr, arg, param)
mtx_leave(&audio_lock);
return 0;
}
-
-
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 4d7c7aa7689..7b964bdde04 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.35 2013/05/24 07:58:46 ratchov Exp $ */
+/* $OpenBSD: maestro.c,v 1.36 2013/11/15 16:46:27 brad Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -581,8 +581,7 @@ struct {
#define NMAESTRO_PCITAB lengthof(maestro_pcitab)
int
-maestro_get_flags(pa)
- struct pci_attach_args *pa;
+maestro_get_flags(struct pci_attach_args *pa)
{
int i;
@@ -603,10 +602,7 @@ maestro_get_flags(pa)
*/
int
-maestro_match(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+maestro_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
@@ -617,10 +613,7 @@ maestro_match(parent, match, aux)
}
void
-maestro_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+maestro_attach(struct device *parent, struct device *self, void *aux)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
@@ -769,8 +762,7 @@ maestro_attach(parent, self, aux)
}
void
-maestro_init(sc)
- struct maestro_softc *sc;
+maestro_init(struct maestro_softc *sc)
{
int reg;
pcireg_t data;
@@ -851,19 +843,13 @@ maestro_init(sc)
*/
int
-maestro_round_blocksize(self, blk)
- void *self;
- int blk;
+maestro_round_blocksize(void *self, int blk)
{
return ((blk + 0xf) & ~0xf);
}
void *
-maestro_malloc(arg, dir, size, pool, flags)
- void *arg;
- int dir;
- size_t size;
- int pool, flags;
+maestro_malloc(void *arg, int dir, size_t size, int pool, int flags)
{
struct maestro_softc *sc = (struct maestro_softc *)arg;
@@ -871,9 +857,7 @@ maestro_malloc(arg, dir, size, pool, flags)
}
void
-maestro_free(self, ptr, pool)
- void *self, *ptr;
- int pool;
+maestro_free(void *self, void *ptr, int pool)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
@@ -881,10 +865,7 @@ maestro_free(self, ptr, pool)
}
paddr_t
-maestro_mappage(self, mem, off, prot)
- void *self, *mem;
- off_t off;
- int prot;
+maestro_mappage(void *self, void *mem, off_t off, int prot)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
@@ -895,8 +876,7 @@ maestro_mappage(self, mem, off, prot)
}
int
-maestro_get_props(self)
- void *self;
+maestro_get_props(void *self)
{
/* struct maestro_softc *sc = (struct maestro_softc *)self; */
@@ -904,9 +884,7 @@ maestro_get_props(self)
}
int
-maestro_getdev(self, retp)
- void *self;
- struct audio_device *retp;
+maestro_getdev(void *self, struct audio_device *retp)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
@@ -915,9 +893,7 @@ maestro_getdev(self, retp)
}
int
-maestro_set_port(self, cp)
- void *self;
- mixer_ctrl_t *cp;
+maestro_set_port(void *self, mixer_ctrl_t *cp)
{
struct ac97_codec_if *c = ((struct maestro_softc *)self)->codec_if;
int rc;
@@ -933,9 +909,7 @@ maestro_set_port(self, cp)
}
int
-maestro_get_port(self, cp)
- void *self;
- mixer_ctrl_t *cp;
+maestro_get_port(void *self, mixer_ctrl_t *cp)
{
struct ac97_codec_if *c = ((struct maestro_softc *)self)->codec_if;
int rc;
@@ -951,9 +925,7 @@ maestro_get_port(self, cp)
}
int
-maestro_query_devinfo(self, cp)
- void *self;
- mixer_devinfo_t *cp;
+maestro_query_devinfo(void *self, mixer_devinfo_t *cp)
{
struct ac97_codec_if *c = ((struct maestro_softc *)self)->codec_if;
int rc;
@@ -985,9 +957,7 @@ struct audio_encoding maestro_tab[] = {
};
int
-maestro_query_encoding(hdl, fp)
- void *hdl;
- struct audio_encoding *fp;
+maestro_query_encoding(void *hdl, struct audio_encoding *fp)
{
if (fp->index < 0 || fp->index >= lengthof(maestro_tab))
return (EINVAL);
@@ -1004,9 +974,7 @@ maestro_get_default_params(void *addr, int mode, struct audio_params *params)
#define UNUSED __attribute__((unused))
void
-maestro_set_speed(ch, prate)
- struct maestro_channel *ch;
- u_long *prate;
+maestro_set_speed(struct maestro_channel *ch, u_long *prate)
{
ch->speed = *prate;
if ((ch->mode & (MAESTRO_8BIT | MAESTRO_STEREO)) == MAESTRO_8BIT)
@@ -1030,8 +998,7 @@ maestro_set_speed(ch, prate)
}
u_int
-maestro_calc_timer_freq(ch)
- struct maestro_channel *ch;
+maestro_calc_timer_freq(struct maestro_channel *ch)
{
u_int ss = 2;
@@ -1041,8 +1008,7 @@ maestro_calc_timer_freq(ch)
}
void
-maestro_update_timer(sc)
- struct maestro_softc *sc;
+maestro_update_timer(struct maestro_softc *sc)
{
u_int freq = 0;
u_int n;
@@ -1063,10 +1029,8 @@ maestro_update_timer(sc)
int
-maestro_set_params(hdl, setmode, usemode, play, rec)
- void *hdl;
- int setmode, usemode;
- struct audio_params *play, *rec;
+maestro_set_params(void *hdl, int setmode, int usemode,
+ struct audio_params *play, struct audio_params *rec)
{
struct maestro_softc *sc = (struct maestro_softc *)hdl;
@@ -1120,9 +1084,7 @@ maestro_set_params(hdl, setmode, usemode, play, rec)
}
int
-maestro_open(hdl, flags)
- void *hdl;
- int flags;
+maestro_open(void *hdl, int flags)
{
struct maestro_softc *sc = (struct maestro_softc *)hdl;
DPRINTF(("%s: open(%d)\n", sc->dev.dv_xname, flags));
@@ -1142,8 +1104,7 @@ maestro_open(hdl, flags)
}
void
-maestro_close(hdl)
- void *hdl;
+maestro_close(void *hdl)
{
struct maestro_softc *sc UNUSED = (struct maestro_softc *)hdl;
/* nothing to do */
@@ -1151,8 +1112,7 @@ maestro_close(hdl)
void
-maestro_channel_stop(ch)
- struct maestro_channel *ch;
+maestro_channel_stop(struct maestro_channel *ch)
{
wp_apu_write(ch->sc, ch->num, APUREG_APUTYPE,
APUTYPE_INACTIVE << APU_APUTYPE_SHIFT);
@@ -1171,8 +1131,7 @@ maestro_channel_stop(ch)
}
int
-maestro_halt_input(hdl)
- void *hdl;
+maestro_halt_input(void *hdl)
{
struct maestro_softc *sc = (struct maestro_softc *)hdl;
@@ -1185,8 +1144,7 @@ maestro_halt_input(hdl)
}
int
-maestro_halt_output(hdl)
- void *hdl;
+maestro_halt_output(void *hdl)
{
struct maestro_softc *sc = (struct maestro_softc *)hdl;
@@ -1199,13 +1157,8 @@ maestro_halt_output(hdl)
}
int
-maestro_trigger_input(hdl, start, end, blksize, intr, arg, param)
- void *hdl;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+maestro_trigger_input(void *hdl, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct maestro_softc *sc = (struct maestro_softc *)hdl;
@@ -1222,8 +1175,7 @@ maestro_trigger_input(hdl, start, end, blksize, intr, arg, param)
}
void
-maestro_channel_start(ch)
- struct maestro_channel *ch;
+maestro_channel_start(struct maestro_channel *ch)
{
struct maestro_softc *sc = ch->sc;
int n = ch->num;
@@ -1302,13 +1254,8 @@ maestro_channel_start(ch)
}
int
-maestro_trigger_output(hdl, start, end, blksize, intr, arg, param)
- void *hdl;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+maestro_trigger_output(void *hdl, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct maestro_softc *sc = (struct maestro_softc *)hdl;
u_int offset = ((caddr_t)start - sc->dmabase) >> 1;
@@ -1346,17 +1293,13 @@ maestro_trigger_output(hdl, start, end, blksize, intr, arg, param)
*/
enum ac97_host_flags
-maestro_codec_flags(self)
- void *self;
+maestro_codec_flags(void *self)
{
return AC97_HOST_DONT_READ;
}
int
-maestro_read_codec(self, regno, datap)
- void *self;
- u_int8_t regno;
- u_int16_t *datap;
+maestro_read_codec(void *self, u_int8_t regno, u_int16_t *datap)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
int t;
@@ -1394,10 +1337,7 @@ maestro_read_codec(self, regno, datap)
}
int
-maestro_write_codec(self, regno, data)
- void *self;
- u_int8_t regno;
- u_int16_t data;
+maestro_write_codec(void *self, u_int8_t regno, u_int16_t data)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
int t;
@@ -1424,9 +1364,7 @@ maestro_write_codec(self, regno, data)
}
int
-maestro_attach_codec(self, cif)
- void *self;
- struct ac97_codec_if *cif;
+maestro_attach_codec(void *self, struct ac97_codec_if *cif)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
@@ -1435,14 +1373,12 @@ maestro_attach_codec(self, cif)
}
void
-maestro_reset_codec(self)
- void *self UNUSED;
+maestro_reset_codec(void *self UNUSED)
{
}
void
-maestro_initcodec(self)
- void *self;
+maestro_initcodec(void *self)
{
struct maestro_softc *sc = (struct maestro_softc *)self;
u_int16_t data;
@@ -1552,8 +1488,7 @@ maestro_activate(struct device *self, int act)
}
void
-maestro_channel_advance_dma(ch)
- struct maestro_channel *ch;
+maestro_channel_advance_dma(struct maestro_channel *ch)
{
wpreg_t pos;
#ifdef AUDIO_DEBUG
@@ -1583,8 +1518,7 @@ maestro_channel_advance_dma(ch)
/* Some maestro makes sometimes get desynchronized in stereo mode. */
void
-maestro_channel_suppress_jitter(ch)
- struct maestro_channel *ch;
+maestro_channel_suppress_jitter(struct maestro_channel *ch)
{
int cp, diff;
@@ -1601,8 +1535,7 @@ maestro_channel_suppress_jitter(ch)
* Interrupt handler interface
*/
int
-maestro_intr(arg)
- void *arg;
+maestro_intr(void *arg)
{
struct maestro_softc *sc = (struct maestro_softc *)arg;
u_int16_t status;
@@ -1816,10 +1749,7 @@ wc_ctrl_write(struct maestro_softc *sc, int ch, wcreg_t data)
*/
salloc_t
-salloc_new(addr, size, nzones)
- caddr_t addr;
- size_t size;
- int nzones;
+salloc_new(caddr_t addr, size_t size, int nzones)
{
struct salloc_pool *pool;
struct salloc_zone *space;
@@ -1844,18 +1774,14 @@ salloc_new(addr, size, nzones)
}
void
-salloc_destroy(pool)
- salloc_t pool;
+salloc_destroy(salloc_t pool)
{
free(pool, M_TEMP);
}
void
-salloc_insert(pool, head, zone, merge)
- salloc_t pool;
- struct salloc_head *head;
- struct salloc_zone *zone;
- int merge;
+salloc_insert(salloc_t pool, struct salloc_head *head, struct salloc_zone *zone,
+ int merge)
{
struct salloc_zone *prev, *next;
@@ -1886,9 +1812,7 @@ salloc_insert(pool, head, zone, merge)
}
caddr_t
-salloc_alloc(pool, size)
- salloc_t pool;
- size_t size;
+salloc_alloc(salloc_t pool, size_t size)
{
struct salloc_zone *zone, *uzone;
@@ -1915,9 +1839,7 @@ salloc_alloc(pool, size)
}
void
-salloc_free(pool, addr)
- salloc_t pool;
- caddr_t addr;
+salloc_free(salloc_t pool, caddr_t addr)
{
struct salloc_zone *zone;
diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c
index b90f144b231..503eb352ab1 100644
--- a/sys/dev/pci/neo.c
+++ b/sys/dev/pci/neo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neo.c,v 1.28 2013/05/24 07:58:46 ratchov Exp $ */
+/* $OpenBSD: neo.c,v 1.29 2013/11/15 16:46:27 brad Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -422,9 +422,7 @@ nm_loadcoeff(struct neo_softc *sc, int dir, int num)
}
int
-nmchan_getptr(sc, mode)
- struct neo_softc *sc;
- int mode;
+nmchan_getptr(struct neo_softc *sc, int mode)
{
if (mode == AUMODE_PLAY)
return (nm_rd(sc, NM_PBUFFER_CURRP, 4) - sc->pbuf);
@@ -557,10 +555,7 @@ nm_init(struct neo_softc *sc)
void
-neo_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+neo_attach(struct device *parent, struct device *self, void *aux)
{
struct neo_softc *sc = (struct neo_softc *)self;
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
@@ -640,10 +635,7 @@ neo_activate(struct device *self, int act)
}
int
-neo_match(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+neo_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *) aux;
#if 0
@@ -676,10 +668,7 @@ neo_match(parent, match, aux)
}
int
-neo_read_codec(sc_, a, d)
- void *sc_;
- u_int8_t a;
- u_int16_t *d;
+neo_read_codec(void *sc_, u_int8_t a, u_int16_t *d)
{
struct neo_softc *sc = sc_;
@@ -694,10 +683,7 @@ neo_read_codec(sc_, a, d)
int
-neo_write_codec(sc_, a, d)
- void *sc_;
- u_int8_t a;
- u_int16_t d;
+neo_write_codec(void *sc_, u_int8_t a, u_int16_t d)
{
struct neo_softc *sc = sc_;
int cnt = 3;
@@ -717,9 +703,7 @@ neo_write_codec(sc_, a, d)
int
-neo_attach_codec(sc_, codec_if)
- void *sc_;
- struct ac97_codec_if *codec_if;
+neo_attach_codec(void *sc_, struct ac97_codec_if *codec_if)
{
struct neo_softc *sc = sc_;
@@ -728,8 +712,7 @@ neo_attach_codec(sc_, codec_if)
}
void
-neo_reset_codec(sc)
- void *sc;
+neo_reset_codec(void *sc)
{
nm_wr(sc, 0x6c0, 0x01, 1);
nm_wr(sc, 0x6cc, 0x87, 1);
@@ -741,16 +724,13 @@ neo_reset_codec(sc)
enum ac97_host_flags
-neo_flags_codec(sc)
- void *sc;
+neo_flags_codec(void *sc)
{
return (AC97_HOST_DONT_READANY);
}
int
-neo_open(addr, flags)
- void *addr;
- int flags;
+neo_open(void *addr, int flags)
{
return (0);
}
@@ -759,8 +739,7 @@ neo_open(addr, flags)
* Close function is called at splaudio().
*/
void
-neo_close(addr)
- void *addr;
+neo_close(void *addr)
{
struct neo_softc *sc = addr;
@@ -772,9 +751,7 @@ neo_close(addr)
}
int
-neo_query_encoding(addr, fp)
- void *addr;
- struct audio_encoding *fp;
+neo_query_encoding(void *addr, struct audio_encoding *fp)
{
switch (fp->index) {
case 0:
@@ -842,10 +819,8 @@ neo_get_default_params(void *addr, int mode, struct audio_params *params)
/* Todo: don't commit settings to card until we've verified all parameters */
int
-neo_set_params(addr, setmode, usemode, play, rec)
- void *addr;
- int setmode, usemode;
- struct audio_params *play, *rec;
+neo_set_params(void *addr, int setmode, int usemode,
+ struct audio_params *play, struct audio_params *rec)
{
struct neo_softc *sc = addr;
u_int32_t base;
@@ -928,21 +903,14 @@ neo_set_params(addr, setmode, usemode, play, rec)
}
int
-neo_round_blocksize(addr, blk)
- void *addr;
- int blk;
+neo_round_blocksize(void *addr, int blk)
{
return (NM_BUFFSIZE / 2);
}
int
-neo_trigger_output(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+neo_trigger_output(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct neo_softc *sc = addr;
int ssz;
@@ -972,13 +940,8 @@ neo_trigger_output(addr, start, end, blksize, intr, arg, param)
int
-neo_trigger_input(addr, start, end, blksize, intr, arg, param)
- void *addr;
- void *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+neo_trigger_input(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct neo_softc *sc = addr;
int ssz;
@@ -1005,8 +968,7 @@ neo_trigger_input(addr, start, end, blksize, intr, arg, param)
}
int
-neo_halt_output(addr)
- void *addr;
+neo_halt_output(void *addr)
{
struct neo_softc *sc = (struct neo_softc *)addr;
@@ -1020,8 +982,7 @@ neo_halt_output(addr)
}
int
-neo_halt_input(addr)
- void *addr;
+neo_halt_input(void *addr)
{
struct neo_softc *sc = (struct neo_softc *)addr;
@@ -1034,18 +995,14 @@ neo_halt_input(addr)
}
int
-neo_getdev(addr, retp)
- void *addr;
- struct audio_device *retp;
+neo_getdev(void *addr, struct audio_device *retp)
{
*retp = neo_device;
return (0);
}
int
-neo_mixer_set_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+neo_mixer_set_port(void *addr, mixer_ctrl_t *cp)
{
struct neo_softc *sc = addr;
@@ -1053,9 +1010,7 @@ neo_mixer_set_port(addr, cp)
}
int
-neo_mixer_get_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+neo_mixer_get_port(void *addr, mixer_ctrl_t *cp)
{
struct neo_softc *sc = addr;
@@ -1063,9 +1018,7 @@ neo_mixer_get_port(addr, cp)
}
int
-neo_query_devinfo(addr, dip)
- void *addr;
- mixer_devinfo_t *dip;
+neo_query_devinfo(void *addr, mixer_devinfo_t *dip)
{
struct neo_softc *sc = addr;
@@ -1073,11 +1026,7 @@ neo_query_devinfo(addr, dip)
}
void *
-neo_malloc(addr, direction, size, pool, flags)
- void *addr;
- int direction;
- size_t size;
- int pool, flags;
+neo_malloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct neo_softc *sc = addr;
void *rv = 0;
@@ -1097,28 +1046,20 @@ neo_malloc(addr, direction, size, pool, flags)
}
void
-neo_free(addr, ptr, pool)
- void *addr;
- void *ptr;
- int pool;
+neo_free(void *addr, void *ptr, int pool)
{
return;
}
size_t
-neo_round_buffersize(addr, direction, size)
- void *addr;
- int direction;
- size_t size;
+neo_round_buffersize(void *addr, int direction, size_t size)
{
return (NM_BUFFSIZE);
}
int
-neo_get_props(addr)
- void *addr;
+neo_get_props(void *addr)
{
-
return (AUDIO_PROP_INDEPENDENT | AUDIO_PROP_FULLDUPLEX);
}
diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c
index 712ef6369fe..c39fc48c489 100644
--- a/sys/dev/pci/sv.c
+++ b/sys/dev/pci/sv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sv.c,v 1.29 2013/05/24 07:58:47 ratchov Exp $ */
+/* $OpenBSD: sv.c,v 1.30 2013/11/15 16:46:27 brad Exp $ */
/*
* Copyright (c) 1998 Constantine Paul Sapuntzakis
@@ -197,27 +197,19 @@ static __inline__ void sv_write_indirect(struct sv_softc *, u_int8_t, u_int8_t )
static void sv_init_mixer(struct sv_softc *);
static __inline__ void
-sv_write (sc, reg, val)
- struct sv_softc *sc;
- u_int8_t reg, val;
-
+sv_write (struct sv_softc *sc, u_int8_t reg, u_int8_t val)
{
bus_space_write_1(sc->sc_iot, sc->sc_ioh, reg, val);
}
static __inline__ u_int8_t
-sv_read (sc, reg)
- struct sv_softc *sc;
- u_int8_t reg;
-
+sv_read (struct sv_softc *sc, u_int8_t reg)
{
return (bus_space_read_1(sc->sc_iot, sc->sc_ioh, reg));
}
static __inline__ u_int8_t
-sv_read_indirect (sc, reg)
- struct sv_softc *sc;
- u_int8_t reg;
+sv_read_indirect (struct sv_softc *sc, u_int8_t reg)
{
u_int8_t iaddr = 0;
@@ -231,9 +223,7 @@ sv_read_indirect (sc, reg)
}
static __inline__ void
-sv_write_indirect (sc, reg, val)
- struct sv_softc *sc;
- u_int8_t reg, val;
+sv_write_indirect (struct sv_softc *sc, u_int8_t reg, u_int8_t val)
{
u_int8_t iaddr = 0;
#ifdef DIAGNOSTIC
@@ -255,9 +245,7 @@ sv_write_indirect (sc, reg, val)
}
int
-sv_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+sv_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = aux;
@@ -269,10 +257,7 @@ sv_match(parent, match, aux)
}
static void
-sv_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
-
+sv_attach(struct device *parent, struct device *self, void *aux)
{
struct sv_softc *sc = (struct sv_softc *)self;
struct pci_attach_args *pa = aux;
@@ -395,8 +380,7 @@ sv_attach(parent, self, aux)
#ifdef AUDIO_DEBUG
void
-sv_dumpregs(sc)
- struct sv_softc *sc;
+sv_dumpregs(struct sv_softc *sc)
{
int idx;
@@ -425,8 +409,7 @@ sv_dumpregs(sc)
#endif
int
-sv_intr(p)
- void *p;
+sv_intr(void *p)
{
struct sv_softc *sc = p;
u_int8_t intr;
@@ -453,11 +436,7 @@ sv_intr(p)
}
int
-sv_allocmem(sc, size, align, p)
- struct sv_softc *sc;
- size_t size;
- size_t align;
- struct sv_dma *p;
+sv_allocmem(struct sv_softc *sc, size_t size, size_t align, struct sv_dma *p)
{
int error;
@@ -494,9 +473,7 @@ free:
}
int
-sv_freemem(sc, p)
- struct sv_softc *sc;
- struct sv_dma *p;
+sv_freemem(struct sv_softc *sc, struct sv_dma *p)
{
bus_dmamap_unload(sc->sc_dmatag, p->map);
bus_dmamap_destroy(sc->sc_dmatag, p->map);
@@ -506,9 +483,7 @@ sv_freemem(sc, p)
}
int
-sv_open(addr, flags)
- void *addr;
- int flags;
+sv_open(void *addr, int flags)
{
struct sv_softc *sc = addr;
@@ -591,8 +566,7 @@ sv_open(addr, flags)
* Close function is called at splaudio().
*/
void
-sv_close(addr)
- void *addr;
+sv_close(void *addr)
{
struct sv_softc *sc = addr;
@@ -604,9 +578,7 @@ sv_close(addr)
}
int
-sv_query_encoding(addr, fp)
- void *addr;
- struct audio_encoding *fp;
+sv_query_encoding(void *addr, struct audio_encoding *fp)
{
switch (fp->index) {
case 0:
@@ -667,10 +639,8 @@ sv_query_encoding(addr, fp)
}
int
-sv_set_params(addr, setmode, usemode, p, r)
- void *addr;
- int setmode, usemode;
- struct audio_params *p, *r;
+sv_set_params(void *addr, int setmode, int usemode,
+ struct audio_params *p, struct audio_params *r)
{
struct sv_softc *sc = addr;
void (*pswcode)(void *, u_char *buf, int cnt);
@@ -804,18 +774,13 @@ sv_set_params(addr, setmode, usemode, p, r)
}
int
-sv_round_blocksize(addr, blk)
- void *addr;
- int blk;
+sv_round_blocksize(void *addr, int blk)
{
return ((blk + 31) & -32); /* keep good alignment */
}
int
-sv_dma_init_input(addr, buf, cc)
- void *addr;
- void *buf;
- int cc;
+sv_dma_init_input(void *addr, void *buf, int cc)
{
struct sv_softc *sc = addr;
struct sv_dma *p;
@@ -843,10 +808,7 @@ sv_dma_init_input(addr, buf, cc)
}
int
-sv_dma_init_output(addr, buf, cc)
- void *addr;
- void *buf;
- int cc;
+sv_dma_init_output(void *addr, void *buf, int cc)
{
struct sv_softc *sc = addr;
struct sv_dma *p;
@@ -873,12 +835,7 @@ sv_dma_init_output(addr, buf, cc)
}
int
-sv_dma_output(addr, p, cc, intr, arg)
- void *addr;
- void *p;
- int cc;
- void (*intr)(void *);
- void *arg;
+sv_dma_output(void *addr, void *p, int cc, void (*intr)(void *), void *arg)
{
struct sv_softc *sc = addr;
u_int8_t mode;
@@ -903,12 +860,7 @@ sv_dma_output(addr, p, cc, intr, arg)
}
int
-sv_dma_input(addr, p, cc, intr, arg)
- void *addr;
- void *p;
- int cc;
- void (*intr)(void *);
- void *arg;
+sv_dma_input(void *addr, void *p, int cc, void (*intr)(void *), void *arg)
{
struct sv_softc *sc = addr;
u_int8_t mode;
@@ -932,8 +884,7 @@ sv_dma_input(addr, p, cc, intr, arg)
}
int
-sv_halt_out_dma(addr)
- void *addr;
+sv_halt_out_dma(void *addr)
{
struct sv_softc *sc = addr;
u_int8_t mode;
@@ -949,8 +900,7 @@ sv_halt_out_dma(addr)
}
int
-sv_halt_in_dma(addr)
- void *addr;
+sv_halt_in_dma(void *addr)
{
struct sv_softc *sc = addr;
u_int8_t mode;
@@ -966,9 +916,7 @@ sv_halt_in_dma(addr)
}
int
-sv_getdev(addr, retp)
- void *addr;
- struct audio_device *retp;
+sv_getdev(void *addr, struct audio_device *retp)
{
*retp = sv_device;
return (0);
@@ -1036,9 +984,7 @@ static const struct {
#define SV_SRS_MODE (SV_LAST_MIXER + 4)
int
-sv_query_devinfo(addr, dip)
- void *addr;
- mixer_devinfo_t *dip;
+sv_query_devinfo(void *addr, mixer_devinfo_t *dip)
{
if (dip->index < 0)
@@ -1152,9 +1098,7 @@ on_off:
}
int
-sv_mixer_set_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+sv_mixer_set_port(void *addr, mixer_ctrl_t *cp)
{
struct sv_softc *sc = addr;
u_int8_t reg;
@@ -1317,9 +1261,7 @@ sv_mixer_set_port(addr, cp)
}
int
-sv_mixer_get_port(addr, cp)
- void *addr;
- mixer_ctrl_t *cp;
+sv_mixer_get_port(void *addr, mixer_ctrl_t *cp)
{
struct sv_softc *sc = addr;
int val;
@@ -1419,8 +1361,7 @@ sv_mixer_get_port(addr, cp)
static void
-sv_init_mixer(sc)
- struct sv_softc *sc;
+sv_init_mixer(struct sv_softc *sc)
{
mixer_ctrl_t cp;
int idx;
@@ -1443,12 +1384,7 @@ sv_init_mixer(sc)
}
void *
-sv_malloc(addr, direction, size, pool, flags)
- void *addr;
- int direction;
- size_t size;
- int pool;
- int flags;
+sv_malloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct sv_softc *sc = addr;
struct sv_dma *p;
@@ -1468,10 +1404,7 @@ sv_malloc(addr, direction, size, pool, flags)
}
void
-sv_free(addr, ptr, pool)
- void *addr;
- void *ptr;
- int pool;
+sv_free(void *addr, void *ptr, int pool)
{
struct sv_softc *sc = addr;
struct sv_dma **p;
@@ -1487,11 +1420,7 @@ sv_free(addr, ptr, pool)
}
paddr_t
-sv_mappage(addr, mem, off, prot)
- void *addr;
- void *mem;
- off_t off;
- int prot;
+sv_mappage(void *addr, void *mem, off_t off, int prot)
{
struct sv_softc *sc = addr;
struct sv_dma *p;
@@ -1505,8 +1434,7 @@ sv_mappage(addr, mem, off, prot)
}
int
-sv_get_props(addr)
- void *addr;
+sv_get_props(void *addr)
{
return (AUDIO_PROP_MMAP | AUDIO_PROP_FULLDUPLEX);
}