diff options
author | Justin T. Gibbs <gibbs@FreeBSD.org> | 1996-03-10 07:13:15 +0000 |
---|---|---|
committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 1996-03-10 07:13:15 +0000 |
commit | 9932c050b9ff6a3a53823631115849de229e06e3 (patch) | |
tree | 29cf135768a192ee2090c99c3c28b91fbd417640 /sys/scsi/scsi_base.c | |
parent | 100eb37c650fd5f9b394be97ecca46f106539c49 (diff) |
Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
Use the system defined *_t types instead.
Notes
Notes:
svn path=/head/; revision=14454
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r-- | sys/scsi/scsi_base.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 20bcc304d875..f6a150ee92eb 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -8,7 +8,7 @@ * file. * * Written by Julian Elischer (julian@dialix.oz.au) - * $Id: scsi_base.c,v 1.34 1995/12/17 21:23:36 phk Exp $ + * $Id: scsi_base.c,v 1.35 1996/01/05 20:12:45 wollman Exp $ */ #include "opt_bounce.h" @@ -33,10 +33,10 @@ static errval sc_err1(struct scsi_xfer *); static errval scsi_interpret_sense(struct scsi_xfer *); -static struct scsi_xfer *get_xs( struct scsi_link *sc_link, u_int32 flags); +static struct scsi_xfer *get_xs( struct scsi_link *sc_link, u_int32_t flags); static void free_xs(struct scsi_xfer *xs, struct scsi_link *sc_link, - u_int32 flags); -static void show_mem(unsigned char *address, u_int32 num); + u_int32_t flags); +static void show_mem(unsigned char *address, u_int32_t num); static void show_scsi_xs (struct scsi_xfer *); #ifdef notyet @@ -59,10 +59,10 @@ static struct scsi_xfer *next_free_xs; static struct scsi_xfer * get_xs(sc_link, flags) struct scsi_link *sc_link; /* who to charge the xs to */ - u_int32 flags; /* if this call can sleep */ + u_int32_t flags; /* if this call can sleep */ { struct scsi_xfer *xs; - u_int32 s; + u_int32_t s; SC_DEBUG(sc_link, SDEV_DB3, ("get_xs\n")); s = splbio(); @@ -105,7 +105,7 @@ static void free_xs(xs, sc_link, flags) struct scsi_xfer *xs; struct scsi_link *sc_link; /* who to credit for returning it */ - u_int32 flags; + u_int32_t flags; { xs->next = next_free_xs; next_free_xs = xs; @@ -130,15 +130,15 @@ free_xs(xs, sc_link, flags) /* * Find out from the device what its capacity is. */ -u_int32 +u_int32_t scsi_read_capacity(sc_link, blk_size, flags) struct scsi_link *sc_link; - u_int32 *blk_size; - u_int32 flags; + u_int32_t *blk_size; + u_int32_t flags; { struct scsi_read_cap_data rdcap; struct scsi_read_capacity scsi_cmd; - u_int32 size; + u_int32_t size; /* * make up a scsi command and ask the scsi driver to do @@ -214,7 +214,7 @@ scsi_target_mode(sc_link, on_off) errval scsi_test_unit_ready(sc_link, flags) struct scsi_link *sc_link; - u_int32 flags; + u_int32_t flags; { struct scsi_test_unit_ready scsi_cmd; @@ -239,7 +239,7 @@ scsi_test_unit_ready(sc_link, flags) errval scsi_change_def(sc_link, flags) struct scsi_link *sc_link; - u_int32 flags; + u_int32_t flags; { struct scsi_changedef scsi_cmd; @@ -267,7 +267,7 @@ errval scsi_inquire(sc_link, inqbuf, flags) struct scsi_link *sc_link; struct scsi_inquiry_data *inqbuf; - u_int32 flags; + u_int32_t flags; { struct scsi_inquiry scsi_cmd; @@ -292,7 +292,7 @@ scsi_inquire(sc_link, inqbuf, flags) errval scsi_prevent(sc_link, type, flags) struct scsi_link *sc_link; - u_int32 type, flags; + u_int32_t type, flags; { struct scsi_prevent scsi_cmd; @@ -316,7 +316,7 @@ scsi_prevent(sc_link, type, flags) errval scsi_start_unit(sc_link, flags) struct scsi_link *sc_link; - u_int32 flags; + u_int32_t flags; { struct scsi_start_stop scsi_cmd; @@ -341,8 +341,8 @@ scsi_start_unit(sc_link, flags) errval scsi_stop_unit(sc_link, eject, flags) struct scsi_link *sc_link; - u_int32 eject; - u_int32 flags; + u_int32_t eject; + u_int32_t flags; { struct scsi_start_stop scsi_cmd; @@ -455,17 +455,17 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen, retries, timeout, bp, flags) struct scsi_link *sc_link; struct scsi_generic *scsi_cmd; - u_int32 cmdlen; + u_int32_t cmdlen; u_char *data_addr; - u_int32 datalen; - u_int32 retries; - u_int32 timeout; + u_int32_t datalen; + u_int32_t retries; + u_int32_t timeout; struct buf *bp; - u_int32 flags; + u_int32_t flags; { struct scsi_xfer *xs; errval retval; - u_int32 s; + u_int32_t s; /* * Illegal command lengths will wedge host adapter software. @@ -478,8 +478,8 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen, return EFAULT; else { - static u_int8 sizes[] = {6, 10, 10, 0, 0, 12, 0, 0 }; - u_int8 size = sizes[((scsi_cmd->opcode) >> 5)]; + static u_int8_t sizes[] = {6, 10, 10, 0, 0, 12, 0, 0 }; + u_int8_t size = sizes[((scsi_cmd->opcode) >> 5)]; if (size && (size != cmdlen)) return EIO; } @@ -800,8 +800,8 @@ void scsi_sense_print(xs) { struct scsi_sense_data_new *sense; struct scsi_sense_extended *ext; - u_int32 key; - u_int32 info; + u_int32_t key; + u_int32_t info; int asc, ascq; /* This sense key text now matches what is in the SCSI spec @@ -931,8 +931,8 @@ scsi_interpret_sense(xs) { struct scsi_sense_data *sense; struct scsi_link *sc_link = xs->sc_link; - u_int32 key; - u_int32 silent; + u_int32_t key; + u_int32_t silent; errval errcode; int error_code; @@ -947,7 +947,7 @@ scsi_interpret_sense(xs) #ifdef SCSIDEBUG if (sc_link->flags & SDEV_DB1) { - u_int32 count = 0; + u_int32_t count = 0; printf("code%x valid%x ", sense->error_code & SSD_ERRCODE, sense->error_code & SSD_ERRCODE_VALID ? 1 : 0); @@ -1107,7 +1107,7 @@ scsi_interpret_sense(xs) */ void scsi_uto3b(val, bytes) - u_int32 val; + u_int32_t val; u_char *bytes; { *bytes++ = (val & 0xff0000) >> 16; @@ -1115,43 +1115,43 @@ scsi_uto3b(val, bytes) *bytes = val & 0xff; } -u_int32 +u_int32_t scsi_3btou(bytes) u_char *bytes; { - u_int32 rc; + u_int32_t rc; rc = (*bytes++ << 16); rc += (*bytes++ << 8); rc += *bytes; return rc; } -int32 +int32_t scsi_3btoi(bytes) u_char *bytes; { - u_int32 rc = scsi_3btou(bytes); + u_int32_t rc = scsi_3btou(bytes); if (rc & 0x00800000) rc |= 0xff000000; - return (int32) rc; + return (int32_t) rc; } void scsi_uto2b(val, bytes) - u_int32 val; + u_int32_t val; u_char *bytes; { *bytes++ = (val & 0xff00) >> 8; *bytes = val & 0xff; } -u_int32 +u_int32_t scsi_2btou(bytes) u_char *bytes; { - u_int32 rc; + u_int32_t rc; rc = (*bytes++ << 8); rc += *bytes; return rc; @@ -1159,7 +1159,7 @@ scsi_2btou(bytes) void scsi_uto4b(val, bytes) - u_int32 val; + u_int32_t val; u_char *bytes; { *bytes++ = (val & 0xff000000) >> 24; @@ -1168,11 +1168,11 @@ scsi_uto4b(val, bytes) *bytes = val & 0xff; } -u_int32 +u_int32_t scsi_4btou(bytes) u_char *bytes; { - u_int32 rc; + u_int32_t rc; rc = (*bytes++ << 24); rc += (*bytes++ << 16); rc += (*bytes++ << 8); @@ -1297,9 +1297,9 @@ show_scsi_cmd(struct scsi_xfer *xs) static void show_mem(address, num) unsigned char *address; - u_int32 num; + u_int32_t num; { - u_int32 y; + u_int32_t y; printf("------------------------------"); for (y = 0; y < num; y += 1) { if (!(y % 16)) |