summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2005-01-02 12:22:18 +0000
committertsutsui <tsutsui@NetBSD.org>2005-01-02 12:22:18 +0000
commit1d25696d75219fa0bf6fa80e3cd295aacafb4258 (patch)
tree9e63a6d496fcfa15cac628ab53f281a7037ae1c7 /sys/dev
parent2be3acc29a1d8b7dd1bcd5557d26933b25f0d463 (diff)
u_intNN_t -> uintNN_t
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/fmv.c8
-rw-r--r--sys/dev/ic/fmvvar.h4
-rw-r--r--sys/dev/ic/iha.c92
-rw-r--r--sys/dev/ic/ihavar.h56
-rw-r--r--sys/dev/ic/mb89352.c8
-rw-r--r--sys/dev/ic/oosiop.c30
-rw-r--r--sys/dev/ic/oosiopvar.h24
-rw-r--r--sys/dev/ic/osiop.c26
-rw-r--r--sys/dev/ic/osiopvar.h40
9 files changed, 144 insertions, 144 deletions
diff --git a/sys/dev/ic/fmv.c b/sys/dev/ic/fmv.c
index 83d95823ac3..215ecc24514 100644
--- a/sys/dev/ic/fmv.c
+++ b/sys/dev/ic/fmv.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fmv.c,v 1.4 2004/09/25 09:46:17 tsutsui Exp $ */
+/* $NetBSD: fmv.c,v 1.5 2005/01/02 12:22:19 tsutsui Exp $ */
/*
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fmv.c,v 1.4 2004/09/25 09:46:17 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fmv.c,v 1.5 2005/01/02 12:22:19 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: fmv.c,v 1.4 2004/09/25 09:46:17 tsutsui Exp $");
* Determine type and ethernet address.
*/
int
-fmv_detect(bus_space_tag_t iot, bus_space_handle_t ioh, u_int8_t *enaddr)
+fmv_detect(bus_space_tag_t iot, bus_space_handle_t ioh, uint8_t *enaddr)
{
int model, id, type;
@@ -107,7 +107,7 @@ fmv_attach(struct mb86960_softc *sc)
bus_space_handle_t ioh;
const char *typestr;
int type;
- u_int8_t myea[ETHER_ADDR_LEN];
+ uint8_t myea[ETHER_ADDR_LEN];
iot = sc->sc_bst;
ioh = sc->sc_bsh;
diff --git a/sys/dev/ic/fmvvar.h b/sys/dev/ic/fmvvar.h
index e98745fe186..2c7df4fa696 100644
--- a/sys/dev/ic/fmvvar.h
+++ b/sys/dev/ic/fmvvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: fmvvar.h,v 1.2 2004/09/25 09:46:17 tsutsui Exp $ */
+/* $NetBSD: fmvvar.h,v 1.3 2005/01/02 12:22:19 tsutsui Exp $ */
/*
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@@ -31,5 +31,5 @@
* incurred with its use.
*/
-int fmv_detect(bus_space_tag_t, bus_space_handle_t, u_int8_t *);
+int fmv_detect(bus_space_tag_t, bus_space_handle_t, uint8_t *);
void fmv_attach(struct mb86960_softc *);
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index f8419dcb0f4..b44292cc19f 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $NetBSD: iha.c,v 1.26 2004/12/07 14:48:58 thorpej Exp $ */
+/* $NetBSD: iha.c,v 1.27 2005/01/02 12:22:19 tsutsui Exp $ */
/*-
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.26 2004/12/07 14:48:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.27 2005/01/02 12:22:19 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -65,7 +65,7 @@ __KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.26 2004/12/07 14:48:58 thorpej Exp $");
* SCSI Rate Table, indexed by FLAG_SCSI_RATE field of
* tcs flags.
*/
-static const u_int8_t iha_rate_tbl[] = {
+static const uint8_t iha_rate_tbl[] = {
/* fast 20 */
/* nanosecond divide by 4 */
12, /* 50ns, 20M */
@@ -80,7 +80,7 @@ static const u_int8_t iha_rate_tbl[] = {
#define IHA_MAX_PERIOD 62
#ifdef notused
-static u_int16_t eeprom_default[EEPROM_SIZE] = {
+static uint16_t eeprom_default[EEPROM_SIZE] = {
/* -- Header ------------------------------------ */
/* signature */
EEP_SIGNATURE,
@@ -133,7 +133,7 @@ static u_int16_t eeprom_default[EEPROM_SIZE] = {
#endif
static void iha_append_free_scb(struct iha_softc *, struct iha_scb *);
-static void iha_append_done_scb(struct iha_softc *, struct iha_scb *, u_int8_t);
+static void iha_append_done_scb(struct iha_softc *, struct iha_scb *, uint8_t);
static __inline struct iha_scb *iha_pop_done_scb(struct iha_softc *);
static struct iha_scb *iha_find_pend_scb(struct iha_softc *);
@@ -142,7 +142,7 @@ static __inline void iha_push_pend_scb(struct iha_softc *, struct iha_scb *);
static __inline void iha_del_pend_scb(struct iha_softc *, struct iha_scb *);
static __inline void iha_mark_busy_scb(struct iha_scb *);
-static __inline void iha_set_ssig(struct iha_softc *, u_int8_t, u_int8_t);
+static __inline void iha_set_ssig(struct iha_softc *, uint8_t, uint8_t);
static int iha_alloc_sglist(struct iha_softc *);
@@ -153,20 +153,20 @@ static void iha_update_xfer_mode(struct iha_softc *, int);
static void iha_reset_scsi_bus(struct iha_softc *);
static void iha_reset_chip(struct iha_softc *);
static void iha_reset_dma(struct iha_softc *);
-static void iha_reset_tcs(struct tcs *, u_int8_t);
+static void iha_reset_tcs(struct tcs *, uint8_t);
static void iha_main(struct iha_softc *);
static void iha_scsi(struct iha_softc *);
-static void iha_select(struct iha_softc *, struct iha_scb *, u_int8_t);
-static int iha_wait(struct iha_softc *, u_int8_t);
+static void iha_select(struct iha_softc *, struct iha_scb *, uint8_t);
+static int iha_wait(struct iha_softc *, uint8_t);
static void iha_exec_scb(struct iha_softc *, struct iha_scb *);
static void iha_done_scb(struct iha_softc *, struct iha_scb *);
static int iha_push_sense_request(struct iha_softc *, struct iha_scb *);
static void iha_timeout(void *);
-static void iha_abort_xs(struct iha_softc *, struct scsipi_xfer *, u_int8_t);
-static u_int8_t iha_data_over_run(struct iha_scb *);
+static void iha_abort_xs(struct iha_softc *, struct scsipi_xfer *, uint8_t);
+static uint8_t iha_data_over_run(struct iha_scb *);
static int iha_next_state(struct iha_softc *);
static int iha_state_1(struct iha_softc *);
@@ -190,8 +190,8 @@ static int iha_msgin_extended(struct iha_softc *);
static int iha_msgin_sdtr(struct iha_softc *);
static int iha_msgin_ignore_wid_resid(struct iha_softc *);
-static int iha_msgout(struct iha_softc *, u_int8_t);
-static void iha_msgout_abort(struct iha_softc *, u_int8_t);
+static int iha_msgout(struct iha_softc *, uint8_t);
+static void iha_msgout_abort(struct iha_softc *, uint8_t);
static int iha_msgout_reject(struct iha_softc *);
static int iha_msgout_extended(struct iha_softc *);
static int iha_msgout_wdtr(struct iha_softc *);
@@ -203,12 +203,12 @@ static void iha_sync_done(struct iha_softc *);
static void iha_bad_seq(struct iha_softc *);
static void iha_read_eeprom(struct iha_softc *, struct iha_eeprom *);
-static int iha_se2_rd_all(struct iha_softc *, u_int16_t *);
+static int iha_se2_rd_all(struct iha_softc *, uint16_t *);
static void iha_se2_instr(struct iha_softc *, int);
-static u_int16_t iha_se2_rd(struct iha_softc *, int);
+static uint16_t iha_se2_rd(struct iha_softc *, int);
#ifdef notused
static void iha_se2_update_all(struct iha_softc *);
-static void iha_se2_wr(struct iha_softc *, int, u_int16_t);
+static void iha_se2_wr(struct iha_softc *, int, uint16_t);
#endif
/*
@@ -248,7 +248,7 @@ iha_append_free_scb(struct iha_softc *sc, struct iha_scb *scb)
}
static void
-iha_append_done_scb(struct iha_softc *sc, struct iha_scb *scb, u_int8_t hastat)
+iha_append_done_scb(struct iha_softc *sc, struct iha_scb *scb, uint8_t hastat)
{
struct tcs *tcs;
int s;
@@ -424,11 +424,11 @@ iha_mark_busy_scb(struct iha_scb *scb)
* one which turns off/on the specified signals.
*/
static __inline void
-iha_set_ssig(struct iha_softc *sc, u_int8_t offsigs, u_int8_t onsigs)
+iha_set_ssig(struct iha_softc *sc, uint8_t offsigs, uint8_t onsigs)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
- u_int8_t currsigs;
+ uint8_t currsigs;
currsigs = bus_space_read_1(iot, ioh, TUL_SSIGI);
bus_space_write_1(iot, ioh, TUL_SSIGO, (currsigs & ~offsigs) | onsigs);
@@ -860,7 +860,7 @@ iha_reset_dma(struct iha_softc *sc)
* the other bits are fixed at initialization.
*/
static void
-iha_reset_tcs(struct tcs *tcs, u_int8_t config0)
+iha_reset_tcs(struct tcs *tcs, uint8_t config0)
{
tcs->flags &= ~(FLAG_SYNC_DONE | FLAG_WIDE_DONE);
@@ -914,7 +914,7 @@ iha_scsi(struct iha_softc *sc)
bus_space_handle_t ioh = sc->sc_ioh;
struct iha_scb *scb;
struct tcs *tcs;
- u_int8_t stat;
+ uint8_t stat;
/* service pending interrupts asap */
@@ -1003,7 +1003,7 @@ iha_scsi(struct iha_softc *sc)
}
static void
-iha_select(struct iha_softc *sc, struct iha_scb *scb, u_int8_t select_type)
+iha_select(struct iha_softc *sc, struct iha_scb *scb, uint8_t select_type)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -1052,7 +1052,7 @@ iha_select(struct iha_softc *sc, struct iha_scb *scb, u_int8_t select_type)
* the command is NO_OP, skip the command writing.
*/
static int
-iha_wait(struct iha_softc *sc, u_int8_t cmd)
+iha_wait(struct iha_softc *sc, uint8_t cmd)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -1357,7 +1357,7 @@ iha_timeout(void *arg)
* queue with the supplied host status value.
*/
static void
-iha_abort_xs(struct iha_softc *sc, struct scsipi_xfer *xs, u_int8_t hastat)
+iha_abort_xs(struct iha_softc *sc, struct scsipi_xfer *xs, uint8_t hastat)
{
struct iha_scb *scb;
int i, s;
@@ -1406,7 +1406,7 @@ iha_abort_xs(struct iha_softc *sc, struct scsipi_xfer *xs, u_int8_t hastat)
* found by scanning all the SCSI-3 T10 drafts. See
* www.t10.org for the curious with a .pdf reader.
*/
-static u_int8_t
+static uint8_t
iha_data_over_run(struct iha_scb *scb)
{
switch (scb->cmd[0]) {
@@ -1747,8 +1747,8 @@ iha_state_5(struct iha_softc *sc)
bus_space_handle_t ioh = sc->sc_ioh;
struct iha_scb *scb = sc->sc_actscb;
struct iha_sg_element *sg;
- u_int32_t cnt;
- u_int8_t period, stat;
+ uint32_t cnt;
+ uint8_t period, stat;
long xcnt; /* cannot use unsigned!! see code: if (xcnt < 0) */
int i;
@@ -1893,7 +1893,7 @@ iha_state_8(struct iha_softc *sc)
bus_space_handle_t ioh = sc->sc_ioh;
struct iha_scb *scb;
int i;
- u_int8_t tar;
+ uint8_t tar;
if (sc->sc_phase == PHASE_MSG_OUT) {
bus_space_write_1(iot, ioh, TUL_SFIFO, MSG_BUS_DEV_RESET);
@@ -1940,8 +1940,8 @@ iha_xfer_data(struct iha_softc *sc, struct iha_scb *scb, int direction)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
- u_int32_t xferlen;
- u_int8_t xfercmd;
+ uint32_t xferlen;
+ uint8_t xfercmd;
if ((scb->flags & (FLAG_DATAIN | FLAG_DATAOUT)) != direction)
return (6); /* wrong direction, abandon I/O */
@@ -2041,7 +2041,7 @@ iha_status_msg(struct iha_softc *sc)
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
struct iha_scb *scb;
- u_int8_t msg;
+ uint8_t msg;
int phase;
if ((phase = iha_wait(sc, CMD_COMP)) == -1)
@@ -2139,7 +2139,7 @@ iha_resel(struct iha_softc *sc)
bus_space_handle_t ioh = sc->sc_ioh;
struct iha_scb *scb;
struct tcs *tcs;
- u_int8_t tag, target, lun, msg, abortmsg;
+ uint8_t tag, target, lun, msg, abortmsg;
if (sc->sc_actscb != NULL) {
if ((sc->sc_actscb->status == STATUS_SELECT))
@@ -2227,7 +2227,7 @@ iha_msgin(struct iha_softc *sc)
bus_space_handle_t ioh = sc->sc_ioh;
int flags;
int phase;
- u_int8_t msg;
+ uint8_t msg;
for (;;) {
if ((bus_space_read_1(iot, ioh, TUL_SFIFOCNT) & FIFOC) > 0)
@@ -2378,7 +2378,7 @@ iha_msgin_sdtr(struct iha_softc *sc)
{
int flags;
int newoffer;
- u_int8_t default_period;
+ uint8_t default_period;
flags = sc->sc_actscb->tcs->flags;
@@ -2439,7 +2439,7 @@ iha_msgin_ignore_wid_resid(struct iha_softc *sc)
}
static int
-iha_msgout(struct iha_softc *sc, u_int8_t msg)
+iha_msgout(struct iha_softc *sc, uint8_t msg)
{
bus_space_write_1(sc->sc_iot, sc->sc_ioh, TUL_SFIFO, msg);
@@ -2448,7 +2448,7 @@ iha_msgout(struct iha_softc *sc, u_int8_t msg)
}
static void
-iha_msgout_abort(struct iha_softc *sc, u_int8_t aborttype)
+iha_msgout_abort(struct iha_softc *sc, uint8_t aborttype)
{
iha_set_ssig(sc, REQ | BSY | SEL, ATN);
@@ -2608,8 +2608,8 @@ iha_read_eeprom(struct iha_softc *sc, struct iha_eeprom *eeprom)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
- u_int16_t *buf = (u_int16_t *)eeprom;
- u_int8_t gctrl;
+ uint16_t *buf = (uint16_t *)eeprom;
+ uint8_t gctrl;
/* Enable EEProm programming */
gctrl = bus_space_read_1(iot, ioh, TUL_GCTRL0) | EEPRG;
@@ -2636,8 +2636,8 @@ iha_se2_update_all(struct iha_softc *sc)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
- u_int16_t *np;
- u_int32_t chksum;
+ uint16_t *np;
+ uint32_t chksum;
int i;
/* Enable erase/write state of EEPROM */
@@ -2645,7 +2645,7 @@ iha_se2_update_all(struct iha_softc *sc)
bus_space_write_1(iot, ioh, TUL_NVRAM, 0);
EEP_WAIT();
- np = (u_int16_t *)&eeprom_default;
+ np = (uint16_t *)&eeprom_default;
for (i = 0, chksum = 0; i < EEPROM_SIZE - 1; i++) {
iha_se2_wr(sc, i, *np);
@@ -2666,7 +2666,7 @@ iha_se2_update_all(struct iha_softc *sc)
* at the specified offset
*/
static void
-iha_se2_wr(struct iha_softc *sc, int addr, u_int16_t writeword)
+iha_se2_wr(struct iha_softc *sc, int addr, uint16_t writeword)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@@ -2712,13 +2712,13 @@ iha_se2_wr(struct iha_softc *sc, int addr, u_int16_t writeword)
* offset in the Serial E2PROM
*
*/
-static u_int16_t
+static uint16_t
iha_se2_rd(struct iha_softc *sc, int addr)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
int i, bit;
- u_int16_t readword;
+ uint16_t readword;
/* Send 'READ' instruction == address | READ bit */
iha_se2_instr(sc, addr | READ);
@@ -2745,10 +2745,10 @@ iha_se2_rd(struct iha_softc *sc, int addr)
* iha_se2_rd_all - Read SCSI H/A config parameters from serial EEPROM
*/
static int
-iha_se2_rd_all(struct iha_softc *sc, u_int16_t *buf)
+iha_se2_rd_all(struct iha_softc *sc, uint16_t *buf)
{
struct iha_eeprom *eeprom = (struct iha_eeprom *)buf;
- u_int32_t chksum;
+ uint32_t chksum;
int i;
for (i = 0, chksum = 0; i < EEPROM_SIZE - 1; i++) {
diff --git a/sys/dev/ic/ihavar.h b/sys/dev/ic/ihavar.h
index f946775cf81..0e744eab7fd 100644
--- a/sys/dev/ic/ihavar.h
+++ b/sys/dev/ic/ihavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ihavar.h,v 1.8 2002/11/14 17:07:42 tsutsui Exp $ */
+/* $NetBSD: ihavar.h,v 1.9 2005/01/02 12:22:19 tsutsui Exp $ */
/*-
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -51,8 +51,8 @@
* Scatter-Gather Element Structure
*/
struct iha_sg_element {
- u_int32_t sg_addr; /* Data Pointer */
- u_int32_t sg_len; /* Data Length */
+ uint32_t sg_addr; /* Data Pointer */
+ uint32_t sg_len; /* Data Length */
};
#define IHA_SG_SIZE (sizeof(struct iha_sg_element) * IHA_MAX_SG_ENTRIES)
@@ -83,8 +83,8 @@ struct iha_scb {
int target; /* Target Id */
int lun; /* Lun */
- u_int32_t bufaddr; /* Data Buffer Physical Addr */
- u_int32_t buflen; /* Data Allocation Length */
+ uint32_t bufaddr; /* Data Buffer Physical Addr */
+ uint32_t buflen; /* Data Allocation Length */
int ha_stat; /* Status of Host Adapter */
#define HOST_OK 0x00 /* OK - operation a success */
#define HOST_TIMED_OUT 0x01 /* Request timed out */
@@ -102,14 +102,14 @@ struct iha_scb {
bus_size_t sgoffset; /* xfer buf offset */
int sg_size; /* # of valid entries in sg_list */
- u_int32_t sg_addr; /* SGList Physical Address */
+ uint32_t sg_addr; /* SGList Physical Address */
int cmdlen; /* CDB Length */
- u_int8_t cmd[12]; /* SCSI Command */
+ uint8_t cmd[12]; /* SCSI Command */
- u_int8_t scb_id; /* Identity Message */
- u_int8_t scb_tagmsg; /* Tag Message */
- u_int8_t scb_tagid; /* Queue Tag */
+ uint8_t scb_id; /* Identity Message */
+ uint8_t scb_tagmsg; /* Tag Message */
+ uint8_t scb_tagid; /* Queue Tag */
};
/*
@@ -133,8 +133,8 @@ struct tcs {
struct iha_scb *ntagscb;
- u_int8_t syncm;
- u_int8_t sconfig0;
+ uint8_t syncm;
+ uint8_t sconfig0;
};
struct iha_softc {
@@ -180,11 +180,11 @@ struct iha_softc {
struct tcs sc_tcs[IHA_MAX_TARGETS];
- u_int8_t sc_msg[IHA_MAX_EXTENDED_MSG]; /* [0] len, [1] Msg Code */
- u_int8_t sc_sistat;
- u_int8_t sc_status0;
- u_int8_t sc_status1;
- u_int8_t sc_sconf1;
+ uint8_t sc_msg[IHA_MAX_EXTENDED_MSG]; /* [0] len, [1] Msg Code */
+ uint8_t sc_sistat;
+ uint8_t sc_status0;
+ uint8_t sc_status1;
+ uint8_t sc_sconf1;
};
/*
@@ -198,7 +198,7 @@ struct iha_softc {
#define EEP_WAIT() DELAY(5)
struct eeprom_adapter {
- u_int16_t config1; /* 0x00 Channel Adapter SCSI Id */
+ uint16_t config1; /* 0x00 Channel Adapter SCSI Id */
#define CFG_ID_MASK 0x000f
#define CFG_ID(cfg) ((cfg) & CFG_ID_MASK)
#define CFG_SCSI_RESET 0x0100 /* Reset bus at power up */
@@ -208,11 +208,11 @@ struct eeprom_adapter {
#define CFG_AUTO_TERM 0x1000 /* Enable auto terminator */
#define CFG_EN_PWR 0x8000 /* Enable power mgmt */
#define CFG_DEFAULT (CFG_SCSI_RESET | CFG_AUTO_TERM | CFG_EN_PAR)
- u_int16_t config2;
+ uint16_t config2;
#define CFG_CFG2(x) EEP_LBYTE(x) /* 0x02 Unused Channel Cfg byte 2*/
#define CFG_TARGET(x) EEP_HBYTE(x) /* 0x03 Number of SCSI targets */
/* 0x04 Lower bytes of targ flags*/
- u_int16_t tflags[IHA_MAX_TARGETS / sizeof(u_int16_t)];
+ uint16_t tflags[IHA_MAX_TARGETS / sizeof(uint16_t)];
#define FLAG_DEFAULT (FLAG_NO_WIDE | FLAG_1GIGA | FLAG_EN_DISC)
};
@@ -221,17 +221,17 @@ struct eeprom_adapter {
*/
struct iha_eeprom {
/* ---------- Header ------------------------------------------------*/
- u_int16_t signature; /* 0x00 NVRAM Signature */
+ uint16_t signature; /* 0x00 NVRAM Signature */
#define EEP_SIGNATURE 0xC925
- u_int16_t revision;
+ uint16_t revision;
#define EEP_SIZE(x) EEP_LBYTE(x) /* 0x02 Size of data structure*/
#define EEP_REV(x) EEP_HBYTE(x) /* 0x03 Rev. of data structure*/
/* ---------- Host Adapter Structure --------------------------------*/
- u_int16_t model; /* 0x04 Model number */
- u_int16_t modelinfo;
+ uint16_t model; /* 0x04 Model number */
+ uint16_t modelinfo;
#define EEP_INFO(x) EEP_LBYTE(x) /* 0x06 Model information */
#define EEP_CHAN(x) EEP_HBYTE(x) /* 0x07 Number of SCSI channel*/
- u_int16_t bioscfg; /* 0x08 BIOS configuration 1 */
+ uint16_t bioscfg; /* 0x08 BIOS configuration 1 */
#define EEP_BIOSCFG_ENABLE 0x0001 /* BIOS enable */
#define EEP_BIOSCFG_8DRIVE 0x0002 /* Support > 2 drives */
#define EEP_BIOSCFG_REMOVABLE 0x0004 /* Support removable drv */
@@ -239,15 +239,15 @@ struct iha_eeprom {
#define EEP_BIOSCFG_BIOSSCAN 0x0010 /* Dynamic BIOS scan */
#define EEP_BIOSCFG_LUNSUPPORT 0x0040 /* Support LUN */
#define EEP_BIOSCFG_DEFAULT EEP_BIOSCFG_ENABLE
- u_int16_t hacfg; /* 0x0a Host adapter config 1 */
+ uint16_t hacfg; /* 0x0a Host adapter config 1 */
#define EEP_HACFG_BOOTIDMASK 0x000F /* Boot ID number */
#define EEP_HACFG_LUNMASK 0x0070 /* Boot LUN number */
#define EEP_HACFG_CHANMASK 0x0080 /* Boot Channel number */
struct eeprom_adapter adapter[2]; /* 0x0c */
- u_int16_t reserved[5]; /* 0x34 */
+ uint16_t reserved[5]; /* 0x34 */
/* --------- CheckSum -----------------------------------------------*/
- u_int16_t checksum; /* 0x3E Checksum of NVRam */
+ uint16_t checksum; /* 0x3E Checksum of NVRam */
};
/* Functions used by higher SCSI layers, the kernel, or iha.c and iha_pci.c */
diff --git a/sys/dev/ic/mb89352.c b/sys/dev/ic/mb89352.c
index 12f4bb5843d..7a3613fe20e 100644
--- a/sys/dev/ic/mb89352.c
+++ b/sys/dev/ic/mb89352.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mb89352.c,v 1.37 2004/09/25 12:17:30 tsutsui Exp $ */
+/* $NetBSD: mb89352.c,v 1.38 2005/01/02 12:22:18 tsutsui Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
/*-
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.37 2004/09/25 12:17:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.38 2005/01/02 12:22:18 tsutsui Exp $");
#ifdef DDB
#define integrate
@@ -911,7 +911,7 @@ spc_msgin(struct spc_softc *sc)
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
int n;
- u_int8_t msg;
+ uint8_t msg;
SPC_TRACE(("spc_msgin "));
@@ -1552,7 +1552,7 @@ spc_datain_pio(struct spc_softc *sc, u_char *p, int n)
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
int in = 0;
- u_int8_t intstat, sstat;
+ uint8_t intstat, sstat;
#define DINAMOUNT 8 /* Full FIFO */
SPC_TRACE(("spc_datain_pio "));
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c
index b1c74d4bd04..85e3580a4ba 100644
--- a/sys/dev/ic/oosiop.c
+++ b/sys/dev/ic/oosiop.c
@@ -1,4 +1,4 @@
-/* $NetBSD: oosiop.c,v 1.5 2004/03/14 20:11:24 wiz Exp $ */
+/* $NetBSD: oosiop.c,v 1.6 2005/01/02 12:22:19 tsutsui Exp $ */
/*
* Copyright (c) 2001 Shuichiro URATA. All rights reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oosiop.c,v 1.5 2004/03/14 20:11:24 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oosiop.c,v 1.6 2005/01/02 12:22:19 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,8 +95,8 @@ static void oosiop_msgin(struct oosiop_softc *, struct oosiop_cb *);
/* Possible TP and SCF conbination */
static const struct {
- u_int8_t tp;
- u_int8_t scf;
+ uint8_t tp;
+ uint8_t scf;
} synctbl[] = {
{0, 1}, /* SCLK / 4.0 */
{1, 1}, /* SCLK / 5.0 */
@@ -326,7 +326,7 @@ oosiop_alloc_cb(struct oosiop_softc *sc, int ncb)
static __inline void
oosiop_relocate_io(struct oosiop_softc *sc, bus_addr_t addr)
{
- u_int32_t dcmd;
+ uint32_t dcmd;
int32_t dsps;
dcmd = le32toh(sc->sc_scr[addr / 4 + 0]);
@@ -353,7 +353,7 @@ oosiop_relocate_io(struct oosiop_softc *sc, bus_addr_t addr)
static __inline void
oosiop_relocate_tc(struct oosiop_softc *sc, bus_addr_t addr)
{
- u_int32_t dcmd;
+ uint32_t dcmd;
int32_t dsps;
dcmd = le32toh(sc->sc_scr[addr / 4 + 0]);
@@ -380,7 +380,7 @@ oosiop_relocate_tc(struct oosiop_softc *sc, bus_addr_t addr)
static __inline void
oosiop_fixup_select(struct oosiop_softc *sc, bus_addr_t addr, int id)
{
- u_int32_t dcmd;
+ uint32_t dcmd;
dcmd = le32toh(sc->sc_scr[addr / 4]);
dcmd &= 0xff00ffff;
@@ -399,7 +399,7 @@ static __inline void
oosiop_fixup_move(struct oosiop_softc *sc, bus_addr_t addr, bus_size_t dbc,
bus_addr_t dsps)
{
- u_int32_t dcmd;
+ uint32_t dcmd;
dcmd = le32toh(sc->sc_scr[addr / 4]);
dcmd &= 0xff000000;
@@ -567,8 +567,8 @@ static void
oosiop_phasemismatch(struct oosiop_softc *sc)
{
struct oosiop_cb *cb;
- u_int32_t dsp, dbc, n, i, len;
- u_int8_t dfifo, sstat1;
+ uint32_t dsp, dbc, n, i, len;
+ uint8_t dfifo, sstat1;
cb = sc->sc_curcb;
if (cb == NULL)
@@ -996,9 +996,9 @@ int
oosiop_intr(struct oosiop_softc *sc)
{
struct oosiop_cb *cb;
- u_int32_t dcmd;
+ uint32_t dcmd;
int timeout;
- u_int8_t istat, dstat, sstat0;
+ uint8_t istat, dstat, sstat0;
istat = oosiop_read_1(sc, OOSIOP_ISTAT);
@@ -1136,10 +1136,10 @@ static void
oosiop_scriptintr(struct oosiop_softc *sc)
{
struct oosiop_cb *cb;
- u_int32_t icode;
- u_int32_t dsp;
+ uint32_t icode;
+ uint32_t dsp;
int i;
- u_int8_t sfbr, resid, resmsg;
+ uint8_t sfbr, resid, resmsg;
cb = sc->sc_curcb;
icode = oosiop_read_4(sc, OOSIOP_DSPS);
diff --git a/sys/dev/ic/oosiopvar.h b/sys/dev/ic/oosiopvar.h
index a57fcd4c09d..385b885920b 100644
--- a/sys/dev/ic/oosiopvar.h
+++ b/sys/dev/ic/oosiopvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: oosiopvar.h,v 1.2 2003/05/03 18:11:23 wiz Exp $ */
+/* $NetBSD: oosiopvar.h,v 1.3 2005/01/02 12:22:19 tsutsui Exp $ */
/*
* Copyright (c) 2001 Shuichiro URATA. All rights reserved.
@@ -33,13 +33,13 @@
struct oosiop_xfer {
/* script for scatter/gather DMA (move*nsg+jump) */
- u_int32_t datain_scr[(OOSIOP_NSG + 1) * 2];
- u_int32_t dataout_scr[(OOSIOP_NSG + 1) * 2];
+ uint32_t datain_scr[(OOSIOP_NSG + 1) * 2];
+ uint32_t dataout_scr[(OOSIOP_NSG + 1) * 2];
- u_int8_t msgin[8];
- u_int8_t msgout[8];
- u_int8_t status;
- u_int8_t pad[7];
+ uint8_t msgin[8];
+ uint8_t msgout[8];
+ uint8_t status;
+ uint8_t pad[7];
} __attribute__((__packed__));
#define SCSI_OOSIOP_NOSTATUS 0xff /* device didn't report status */
@@ -95,8 +95,8 @@ TAILQ_HEAD(oosiop_cb_queue, oosiop_cb);
struct oosiop_target {
struct oosiop_cb *nexus;
int flags;
- u_int8_t scf; /* synchronous clock divisor */
- u_int8_t sxfer; /* synchronous period and offset */
+ uint8_t scf; /* synchronous clock divisor */
+ uint8_t sxfer; /* synchronous period and offset */
};
/* target flags */
@@ -113,7 +113,7 @@ struct oosiop_softc {
bus_dmamap_t sc_scrdma; /* script DMA map */
bus_addr_t sc_scrbase; /* script DMA base address */
- u_int32_t *sc_scr; /* ptr to script memory */
+ uint32_t *sc_scr; /* ptr to script memory */
int sc_chip; /* 700 or 700-66 */
#define OOSIOP_700 0
@@ -122,8 +122,8 @@ struct oosiop_softc {
int sc_id; /* SCSI ID of this interface */
int sc_freq; /* SCLK frequency */
int sc_ccf; /* asynchronous divisor (*10) */
- u_int8_t sc_dcntl;
- u_int8_t sc_minperiod;
+ uint8_t sc_dcntl;
+ uint8_t sc_minperiod;
struct oosiop_target sc_tgt[OOSIOP_NTGT];
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c
index 0db2557c1f2..60c5cd51b00 100644
--- a/sys/dev/ic/osiop.c
+++ b/sys/dev/ic/osiop.c
@@ -1,4 +1,4 @@
-/* $NetBSD: osiop.c,v 1.19 2004/09/25 09:46:17 tsutsui Exp $ */
+/* $NetBSD: osiop.c,v 1.20 2005/01/02 12:22:18 tsutsui Exp $ */
/*
* Copyright (c) 2001 Izumi Tsutsui. All rights reserved.
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.19 2004/09/25 09:46:17 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.20 2005/01/02 12:22:18 tsutsui Exp $");
/* #define OSIOP_DEBUG */
@@ -141,7 +141,7 @@ void osiop_init(struct osiop_softc *);
void osiop_reset(struct osiop_softc *);
void osiop_resetbus(struct osiop_softc *);
void osiop_start(struct osiop_softc *);
-int osiop_checkintr(struct osiop_softc *, u_int8_t, u_int8_t, u_int8_t, int *);
+int osiop_checkintr(struct osiop_softc *, uint8_t, uint8_t, uint8_t, int *);
void osiop_select(struct osiop_softc *);
void osiop_update_xfer_mode(struct osiop_softc *, int);
void scsi_period_to_osiop(struct osiop_softc *, int);
@@ -172,7 +172,7 @@ int osiop_trix = 0;
osiop_trbuf[osiop_trix + 3] = (d); \
osiop_trix = (osiop_trix + 4) & (OSIOP_TRACE_SIZE - 1); \
} while (0)
-u_int8_t osiop_trbuf[OSIOP_TRACE_SIZE];
+uint8_t osiop_trbuf[OSIOP_TRACE_SIZE];
void osiop_dump_trace(void);
void osiop_dump_acb(struct osiop_acb *);
void osiop_dump(struct osiop_softc *);
@@ -494,7 +494,7 @@ osiop_poll(struct osiop_softc *sc, struct osiop_acb *acb)
{
struct scsipi_xfer *xs = acb->xs;
int status, i, s, to;
- u_int8_t istat, dstat, sstat0;
+ uint8_t istat, dstat, sstat0;
s = splbio();
to = xs->timeout / 1000;
@@ -808,7 +808,7 @@ osiop_reset(struct osiop_softc *sc)
{
struct osiop_acb *acb;
int i, s;
- u_int8_t stat;
+ uint8_t stat;
#ifdef OSIOP_DEBUG
printf("%s: resetting chip\n", sc->sc_dev.dv_xname);
@@ -1072,8 +1072,8 @@ osiop_start(struct osiop_softc *sc)
*/
int
-osiop_checkintr(struct osiop_softc *sc, u_int8_t istat, u_int8_t dstat,
- u_int8_t sstat0, int *status)
+osiop_checkintr(struct osiop_softc *sc, uint8_t istat, uint8_t dstat,
+ uint8_t sstat0, int *status)
{
struct osiop_acb *acb = sc->sc_nexus;
struct osiop_ds *ds = NULL; /* XXX */
@@ -1496,7 +1496,7 @@ osiop_checkintr(struct osiop_softc *sc, u_int8_t istat, u_int8_t dstat,
int reselid = ffs(osiop_read_4(sc, OSIOP_SCRATCH) & 0xff) - 1;
int reselun = osiop_read_1(sc, OSIOP_SFBR) & 0x07;
#ifdef OSIOP_DEBUG
- u_int8_t resmsg;
+ uint8_t resmsg;
#endif
/* Reconnect */
@@ -1561,7 +1561,7 @@ osiop_checkintr(struct osiop_softc *sc, u_int8_t istat, u_int8_t dstat,
}
if (dstat & OSIOP_DSTAT_SIR && intcode == A_int_connect) {
#ifdef OSIOP_DEBUG
- u_int8_t ctest2 = osiop_read_1(sc, OSIOP_CTEST2);
+ uint8_t ctest2 = osiop_read_1(sc, OSIOP_CTEST2);
/* reselect was interrupted (by Sig_P or select) */
if (osiop_debug & DEBUG_DISC ||
@@ -1720,7 +1720,7 @@ void
osiop_intr(struct osiop_softc *sc)
{
int status, s;
- u_int8_t istat, dstat, sstat0;
+ uint8_t istat, dstat, sstat0;
s = splbio();
@@ -1894,7 +1894,7 @@ osiop_dump_trace(void)
void
osiop_dump_acb(struct osiop_acb *acb)
{
- u_int8_t *b;
+ uint8_t *b;
int i;
printf("acb@%p ", acb);
@@ -1903,7 +1903,7 @@ osiop_dump_acb(struct osiop_acb *acb)
return;
}
- b = (u_int8_t *)&acb->xs->cmd;
+ b = (uint8_t *)&acb->xs->cmd;
printf("(%d:%d) status %2x cmdlen %2ld cmd ",
acb->xs->xs_periph->periph_target,
acb->xs->xs_periph->periph_lun, acb->status, acb->cmdlen);
diff --git a/sys/dev/ic/osiopvar.h b/sys/dev/ic/osiopvar.h
index 746fc1faeba..2e68d5b6ace 100644
--- a/sys/dev/ic/osiopvar.h
+++ b/sys/dev/ic/osiopvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: osiopvar.h,v 1.5 2003/11/02 11:07:45 wiz Exp $ */
+/* $NetBSD: osiopvar.h,v 1.6 2005/01/02 12:22:19 tsutsui Exp $ */
/*
* Copyright (c) 2001 Izumi Tsutsui. All rights reserved.
@@ -91,13 +91,13 @@
* Data Structure for SCRIPTS program
*/
typedef struct buf_table {
- u_int32_t count;
- u_int32_t addr;
+ uint32_t count;
+ uint32_t addr;
} buf_table_t;
struct osiop_ds {
- u_int32_t scsi_addr; /* SCSI ID & sync */
- u_int32_t pad1;
+ uint32_t scsi_addr; /* SCSI ID & sync */
+ uint32_t pad1;
buf_table_t id; /* Identify message */
buf_table_t cmd; /* SCSI command */
buf_table_t status; /* Status */
@@ -107,9 +107,9 @@ struct osiop_ds {
buf_table_t synmsg; /* Sync transfer request */
buf_table_t data[OSIOP_NSG]; /* DMA S/G buffers */
- u_int8_t msgout[8];
- u_int8_t msgbuf[8];
- u_int8_t stat[8];
+ uint8_t msgout[8];
+ uint8_t msgbuf[8];
+ uint8_t stat[8];
} __attribute__((__packed__));
/* status can hold the SCSI_* status values, and 2 additional values: */
@@ -163,7 +163,7 @@ struct osiop_acb {
int flags; /* cmd slot flags */
#define ACB_F_TIMEOUT 0x01 /* command timeout */
- u_int8_t intstat; /* buffer to save sc_flags on disconnect */
+ uint8_t intstat; /* buffer to save sc_flags on disconnect */
};
/*
@@ -183,8 +183,8 @@ struct osiop_tinfo {
#define TI_NOSYNC 0x01 /* disable sync xfer on this target */
#define TI_NODISC 0x02 /* disable disconnect on this target */
int state; /* negotiation state */
- u_int8_t sxfer; /* value for SXFER reg */
- u_int8_t sbcl; /* value for SBCL reg */
+ uint8_t sxfer; /* value for SXFER reg */
+ uint8_t sbcl; /* value for SBCL reg */
};
struct osiop_softc {
@@ -197,7 +197,7 @@ struct osiop_softc {
bus_dmamap_t sc_scrdma; /* script dma map */
bus_dmamap_t sc_dsdma; /* script data dma map */
- u_int32_t *sc_script; /* ptr to script memory */
+ uint32_t *sc_script; /* ptr to script memory */
struct osiop_ds *sc_ds; /* ptr to data structure memory */
int sc_id; /* adapter SCSI id */
@@ -228,14 +228,14 @@ struct osiop_softc {
int sc_minsync;
- u_int8_t sc_dstat;
- u_int8_t sc_sstat0;
- u_int8_t sc_sstat1;
- u_int8_t sc_istat;
- u_int8_t sc_dcntl;
- u_int8_t sc_ctest7;
- u_int8_t sc_sien;
- u_int8_t sc_dien;
+ uint8_t sc_dstat;
+ uint8_t sc_sstat0;
+ uint8_t sc_sstat1;
+ uint8_t sc_istat;
+ uint8_t sc_dcntl;
+ uint8_t sc_ctest7;
+ uint8_t sc_sien;
+ uint8_t sc_dien;
};
/* negotiation states */