summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1996-03-10 07:13:15 +0000
committergibbs <gibbs@FreeBSD.org>1996-03-10 07:13:15 +0000
commitb37f58736e1b6695334b3d44f8eb6f36dc46415a (patch)
tree29cf135768a192ee2090c99c3c28b91fbd417640
parent61af932716ba3442f37fe2ea464a4739ac1275f4 (diff)
downloadFreeBSD-src-b37f58736e1b6695334b3d44f8eb6f36dc46415a.zip
FreeBSD-src-b37f58736e1b6695334b3d44f8eb6f36dc46415a.tar.gz
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.
-rw-r--r--sys/scsi/cd.c104
-rw-r--r--sys/scsi/ch.c62
-rw-r--r--sys/scsi/od.c38
-rw-r--r--sys/scsi/pt.c10
-rw-r--r--sys/scsi/scsi_base.c90
-rw-r--r--sys/scsi/scsi_driver.c8
-rw-r--r--sys/scsi/scsi_driver.h4
-rw-r--r--sys/scsi/scsi_ioctl.c4
-rw-r--r--sys/scsi/scsiconf.c22
-rw-r--r--sys/scsi/scsiconf.h112
-rw-r--r--sys/scsi/sctarg.c12
-rw-r--r--sys/scsi/sd.c46
-rw-r--r--sys/scsi/st.c158
-rw-r--r--sys/scsi/worm.c32
14 files changed, 348 insertions, 354 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index e934cae..04f5ea3 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.64 1996/02/02 20:43:11 ache Exp $
+ * $Id: cd.c,v 1.66 1996/02/13 03:46:48 ache Exp $
*/
#include "opt_bounce.h"
@@ -48,20 +48,20 @@
#include <scsi/scsiconf.h>
static errval cd_get_parms __P((int, int));
-static u_int32 cd_size __P((int unit, int flags));
-static errval cd_get_mode __P((u_int32, struct cd_mode_data *, u_int32));
-static errval cd_set_mode __P((u_int32 unit, struct cd_mode_data *));
-static errval cd_read_toc __P((u_int32, u_int32, u_int32, struct cd_toc_entry *,
- u_int32));
-
-static errval cd_pause __P((u_int32, u_int32));
-static errval cd_reset __P((u_int32));
-static errval cd_play_msf __P((u_int32, u_int32, u_int32, u_int32, u_int32, u_int32, u_int32));
-static errval cd_play __P((u_int32, u_int32, u_int32));
-static errval cd_play_big __P((u_int32 unit, u_int32 blk, u_int32 len));
-static errval cd_play_tracks __P((u_int32, u_int32, u_int32, u_int32, u_int32));
-static errval cd_read_subchannel __P((u_int32, u_int32, u_int32, int, struct cd_sub_channel_info *, u_int32));
-static errval cd_getdisklabel __P((u_int8));
+static u_int32_t cd_size __P((int unit, int flags));
+static errval cd_get_mode __P((u_int32_t, struct cd_mode_data *, u_int32_t));
+static errval cd_set_mode __P((u_int32_t unit, struct cd_mode_data *));
+static errval cd_read_toc __P((u_int32_t, u_int32_t, u_int32_t, struct cd_toc_entry *,
+ u_int32_t));
+
+static errval cd_pause __P((u_int32_t, u_int32_t));
+static errval cd_reset __P((u_int32_t));
+static errval cd_play_msf __P((u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t));
+static errval cd_play __P((u_int32_t, u_int32_t, u_int32_t));
+static errval cd_play_big __P((u_int32_t unit, u_int32_t blk, u_int32_t len));
+static errval cd_play_tracks __P((u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t));
+static errval cd_read_subchannel __P((u_int32_t, u_int32_t, u_int32_t, int, struct cd_sub_channel_info *, u_int32_t));
+static errval cd_getdisklabel __P((u_int8_t));
static d_open_t cdopen;
static d_close_t cdclose;
@@ -82,7 +82,7 @@ static struct cdevsw cd_cdevsw =
&cd_bdevsw, -1 };
-static int32 cdstrats, cdqueues;
+static int32_t cdstrats, cdqueues;
#define CDUNIT(DEV) ((minor(DEV)&0xF8) >> 3) /* 5 bit unit */
#define CDSETUNIT(DEV, U) makedev(major(DEV), ((U) << 3))
@@ -96,20 +96,20 @@ static int32 cdstrats, cdqueues;
#define PARTITION(z) (minor(z) & 0x07)
#define RAW_PART 2
-static void cdstart(u_int32 unit, u_int32 flags);
+static void cdstart(u_int32_t unit, u_int32_t flags);
struct scsi_data {
- u_int32 flags;
+ u_int32_t flags;
#define CDINIT 0x04 /* device has been init'd */
struct cd_parms {
- u_int32 blksize;
+ u_int32_t blksize;
u_long disksize; /* total number sectors */
} params;
struct disklabel disklabel;
- u_int32 partflags[MAXPARTITIONS]; /* per partition flags */
+ u_int32_t partflags[MAXPARTITIONS]; /* per partition flags */
#define CDOPEN 0x01
- u_int32 openparts; /* one bit for each open partition */
- u_int32 xfer_block_wait;
+ u_int32_t openparts; /* one bit for each open partition */
+ u_int32_t xfer_block_wait;
struct buf_queue_head buf_queue;
int dkunit;
#ifdef DEVFS
@@ -203,7 +203,7 @@ cd_registerdev(int unit)
static int
cdattach(struct scsi_link *sc_link)
{
- u_int32 unit;
+ u_int32_t unit;
struct cd_parms *dp;
struct scsi_data *cd = sc_link->sd;
char name[32];
@@ -275,7 +275,7 @@ cd_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
errval errcode = 0;
- u_int32 unit, part;
+ u_int32_t unit, part;
struct scsi_data *cd;
unit = CDUNIT(dev);
@@ -388,7 +388,7 @@ static errval
cd_close(dev_t dev, int flag, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
- u_int8 unit, part;
+ u_int8_t unit, part;
struct scsi_data *cd;
unit = CDUNIT(dev);
@@ -418,8 +418,8 @@ cd_close(dev_t dev, int flag, int fmt, struct proc *p,
static void
cd_strategy(struct buf *bp, struct scsi_link *sc_link)
{
- u_int32 opri;
- u_int32 unit = CDUNIT((bp->b_dev));
+ u_int32_t opri;
+ u_int32_t unit = CDUNIT((bp->b_dev));
struct scsi_data *cd = sc_link->sd;
cdstrats++;
@@ -506,12 +506,12 @@ cd_strategy(struct buf *bp, struct scsi_link *sc_link)
*/
static void
cdstart(unit, flags)
- u_int32 unit;
- u_int32 flags;
+ u_int32_t unit;
+ u_int32_t flags;
{
register struct buf *bp = 0;
struct scsi_rw_big cmd;
- u_int32 blkno, nblk;
+ u_int32_t blkno, nblk;
struct partition *p;
struct scsi_link *sc_link = SCSI_LINK(&cd_switch, unit);
struct scsi_data *cd = sc_link->sd;
@@ -606,7 +606,7 @@ cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
struct scsi_link *sc_link)
{
errval error = 0;
- u_int8 unit, part;
+ u_int8_t unit, part;
register struct scsi_data *cd;
/*
@@ -722,7 +722,7 @@ cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
struct ioc_read_subchannel *args
= (struct ioc_read_subchannel *) addr;
struct cd_sub_channel_info data;
- u_int32 len = args->data_len;
+ u_int32_t len = args->data_len;
if (len > sizeof(data) ||
len < sizeof(struct cd_sub_channel_header)) {
error = EINVAL;
@@ -764,8 +764,8 @@ cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
struct ioc_read_toc_entry *te =
(struct ioc_read_toc_entry *) addr;
struct ioc_toc_header *th;
- u_int32 len, readlen, idx, num;
- u_int32 starting_track = te->starting_track;
+ u_int32_t len, readlen, idx, num;
+ u_int32_t starting_track = te->starting_track;
if ( te->data_len < sizeof(struct cd_toc_entry)
|| (te->data_len % sizeof(struct cd_toc_entry)) != 0
@@ -1004,7 +1004,7 @@ cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
*/
static errval
cd_getdisklabel(unit)
- u_int8 unit;
+ u_int8_t unit;
{
/*unsigned int n, m; */
struct scsi_data *cd;
@@ -1051,15 +1051,15 @@ cd_getdisklabel(unit)
/*
* Find out from the device what it's capacity is
*/
-static u_int32
+static u_int32_t
cd_size(unit, flags)
int unit;
int flags;
{
struct scsi_read_cd_cap_data rdcap;
struct scsi_read_cd_capacity scsi_cmd;
- u_int32 size;
- u_int32 blksize;
+ u_int32_t size;
+ u_int32_t blksize;
struct scsi_link *sc_link = SCSI_LINK(&cd_switch, unit);
struct scsi_data *cd = sc_link->sd;
@@ -1110,9 +1110,9 @@ cd_size(unit, flags)
*/
static errval
cd_get_mode(unit, data, page)
- u_int32 unit;
+ u_int32_t unit;
struct cd_mode_data *data;
- u_int32 page;
+ u_int32_t page;
{
struct scsi_mode_sense scsi_cmd;
errval retval;
@@ -1139,7 +1139,7 @@ cd_get_mode(unit, data, page)
*/
static errval
cd_set_mode(unit, data)
- u_int32 unit;
+ u_int32_t unit;
struct cd_mode_data *data;
{
struct scsi_mode_select scsi_cmd;
@@ -1171,7 +1171,7 @@ cd_set_mode(unit, data)
*/
static errval
cd_play(unit, blk, len)
- u_int32 unit, blk, len;
+ u_int32_t unit, blk, len;
{
struct scsi_play scsi_cmd;
@@ -1199,7 +1199,7 @@ cd_play(unit, blk, len)
*/
static errval
cd_play_big(unit, blk, len)
- u_int32 unit, blk, len;
+ u_int32_t unit, blk, len;
{
struct scsi_play_big scsi_cmd;
@@ -1229,7 +1229,7 @@ cd_play_big(unit, blk, len)
*/
static errval
cd_play_tracks(unit, strack, sindex, etrack, eindex)
- u_int32 unit, strack, sindex, etrack, eindex;
+ u_int32_t unit, strack, sindex, etrack, eindex;
{
struct scsi_play_track scsi_cmd;
@@ -1255,7 +1255,7 @@ cd_play_tracks(unit, strack, sindex, etrack, eindex)
*/
static errval
cd_play_msf(unit, startm, starts, startf, endm, ends, endf)
- u_int32 unit, startm, starts, startf, endm, ends, endf;
+ u_int32_t unit, startm, starts, startf, endm, ends, endf;
{
struct scsi_play_msf scsi_cmd;
@@ -1284,7 +1284,7 @@ cd_play_msf(unit, startm, starts, startf, endm, ends, endf)
*/
static errval
cd_pause(unit, go)
- u_int32 unit, go;
+ u_int32_t unit, go;
{
struct scsi_pause scsi_cmd;
@@ -1308,7 +1308,7 @@ cd_pause(unit, go)
*/
static errval
cd_reset(unit)
- u_int32 unit;
+ u_int32_t unit;
{
return scsi_reset_target(SCSI_LINK(&cd_switch, unit));
}
@@ -1318,10 +1318,10 @@ cd_reset(unit)
*/
static errval
cd_read_subchannel(unit, mode, format, track, data, len)
- u_int32 unit, mode, format;
+ u_int32_t unit, mode, format;
int track;
struct cd_sub_channel_info *data;
- u_int32 len;
+ u_int32_t len;
{
struct scsi_read_subchannel scsi_cmd;
@@ -1351,12 +1351,12 @@ cd_read_subchannel(unit, mode, format, track, data, len)
*/
static errval
cd_read_toc(unit, mode, start, data, len)
- u_int32 unit, mode, start;
+ u_int32_t unit, mode, start;
struct cd_toc_entry *data;
- u_int32 len;
+ u_int32_t len;
{
struct scsi_read_toc scsi_cmd;
- u_int32 ntoc;
+ u_int32_t ntoc;
bzero(&scsi_cmd, sizeof(scsi_cmd));
/*if(len!=sizeof(struct ioc_toc_header))
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index a5e406b..a1b83be 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -2,7 +2,7 @@
* Written by grefen@convex.com (probably moved by now)
* Based on scsi drivers by Julian Elischer (julian@tfs.com)
*
- * $Id: ch.c,v 1.28 1995/12/14 09:54:21 phk Exp $
+ * $Id: ch.c,v 1.29 1995/12/14 19:51:12 bde Exp $
*/
#include <sys/types.h>
@@ -37,31 +37,31 @@
#define ESUCCESS 0
struct scsi_data {
- u_int32 flags;
- u_int16 chmo; /* Offset of first CHM */
- u_int16 chms; /* No. of CHM */
- u_int16 slots; /* No. of Storage Elements */
- u_int16 sloto; /* Offset of first SE */
- u_int16 imexs; /* No. of Import/Export Slots */
- u_int16 imexo; /* Offset of first IM/EX */
- u_int16 drives; /* No. of CTS */
- u_int16 driveo; /* Offset of first CTS */
- u_int16 rot; /* CHM can rotate */
- u_long op_matrix; /* possible opertaions */
- u_int16 lsterr; /* details of lasterror */
- u_char stor; /* posible Storage locations */
+ u_int32_t flags;
+ u_int16_t chmo; /* Offset of first CHM */
+ u_int16_t chms; /* No. of CHM */
+ u_int16_t slots; /* No. of Storage Elements */
+ u_int16_t sloto; /* Offset of first SE */
+ u_int16_t imexs; /* No. of Import/Export Slots */
+ u_int16_t imexo; /* Offset of first IM/EX */
+ u_int16_t drives; /* No. of CTS */
+ u_int16_t driveo; /* Offset of first CTS */
+ u_int16_t rot; /* CHM can rotate */
+ u_long op_matrix; /* possible opertaions */
+ u_int16_t lsterr; /* details of lasterror */
+ u_char stor; /* posible Storage locations */
#ifdef DEVFS
- void *devfs_token;
+ void *devfs_token;
#endif
};
-static errval ch_getelem __P((u_int32 unit, short *stat, int type, u_int32 from,
- void *data, u_int32 flags));
-static errval ch_move __P((u_int32 unit, short *stat, u_int32 chm, u_int32 from,
- u_int32 to, u_int32 flags));
-static errval ch_mode_sense __P((u_int32 unit, u_int32 flags));
-static errval ch_position __P((u_int32 unit, short *stat, u_int32 chm,
- u_int32 to, u_int32 flags));
+static errval ch_getelem __P((u_int32_t unit, short *stat, int type, u_int32_t from,
+ void *data, u_int32_t flags));
+static errval ch_move __P((u_int32_t unit, short *stat, u_int32_t chm, u_int32_t from,
+ u_int32_t to, u_int32_t flags));
+static errval ch_mode_sense __P((u_int32_t unit, u_int32_t flags));
+static errval ch_position __P((u_int32_t unit, short *stat, u_int32_t chm,
+ u_int32_t to, u_int32_t flags));
static int chunit(dev_t dev) { return CHUNIT(dev); }
static dev_t chsetunit(dev_t dev, int unit) { return CHSETUNIT(dev, unit); }
@@ -145,7 +145,7 @@ ch_registerdev(int unit)
static errval
chattach(struct scsi_link *sc_link)
{
- u_int32 unit;
+ u_int32_t unit;
char name[32];
struct scsi_data *ch = sc_link->sd;
@@ -181,7 +181,7 @@ ch_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
errval errcode = 0;
- u_int32 unit, mode;
+ u_int32_t unit, mode;
struct scsi_data *cd;
unit = CHUNIT(dev);
@@ -244,7 +244,7 @@ ch_ioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc *p,
{
/* struct ch_cmd_buf *args; */
unsigned char unit;
- u_int32 flags;
+ u_int32_t flags;
errval ret;
struct scsi_data *cd;
@@ -299,7 +299,7 @@ ch_ioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc *p,
static errval
ch_getelem(unit, stat, type, from, data, flags)
- u_int32 unit, from, flags;
+ u_int32_t unit, from, flags;
int type;
short *stat;
void *data; /* XXX `struct untagged *' - see chio.h */
@@ -339,7 +339,7 @@ ch_getelem(unit, stat, type, from, data, flags)
static errval
ch_move(unit, stat, chm, from, to, flags)
- u_int32 unit, chm, from, to, flags;
+ u_int32_t unit, chm, from, to, flags;
short *stat;
{
struct scsi_move_medium scsi_cmd;
@@ -375,7 +375,7 @@ ch_move(unit, stat, chm, from, to, flags)
static errval
ch_position(unit, stat, chm, to, flags)
- u_int32 unit, chm, to, flags;
+ u_int32_t unit, chm, to, flags;
short *stat;
{
struct scsi_position_to_element scsi_cmd;
@@ -420,7 +420,7 @@ ch_position(unit, stat, chm, to, flags)
*/
static errval
ch_mode_sense(unit, flags)
- u_int32 unit, flags;
+ u_int32_t unit, flags;
{
struct scsi_mode_sense scsi_cmd;
u_char scsi_sense[128]; /* Can't use scsi_mode_sense_data because of
@@ -486,8 +486,8 @@ ch_mode_sense(unit, flags)
} printf("\n");
#endif
for (i = 0; i < l;) {
- u_int32 pc = (*b++) & 0x3f;
- u_int32 pl = *b++;
+ u_int32_t pc = (*b++) & 0x3f;
+ u_int32_t pl = *b++;
u_char *bb = b;
switch ((int)pc) {
case 0x1d:
diff --git a/sys/scsi/od.c b/sys/scsi/od.c
index 9897d36..441bc8e 100644
--- a/sys/scsi/od.c
+++ b/sys/scsi/od.c
@@ -28,7 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: od.c,v 1.12 1996/01/27 04:18:00 bde Exp $
+ * $Id: od.c,v 1.13 1996/03/02 18:24:12 peter Exp $
*/
/*
@@ -67,7 +67,7 @@
#include <sys/dkstat.h>
#include <machine/md_var.h>
-static u_int32 odstrats, odqueues;
+static u_int32_t odstrats, odqueues;
#define SECSIZE 512
#define ODOUTSTANDING 4
@@ -82,14 +82,14 @@ static u_int32 odstrats, odqueues;
makedev(major(DEV), dkmakeminor((U), dkslice(DEV), dkpart(DEV)))
struct scsi_data {
- u_int32 flags;
+ u_int32_t flags;
#define ODINIT 0x04 /* device has been init'd */
struct disk_parms {
- u_char heads; /* Number of heads */
- u_int16 cyls; /* Number of cylinders */
- u_char sectors; /* dubious *//* Number of sectors/track */
- u_int16 secsiz; /* Number of bytes/sector */
- u_int32 disksize; /* total number sectors */
+ u_char heads; /* Number of heads */
+ u_int16_t cyls; /* Number of cylinders */
+ u_char sectors; /* dubious *//* Number of sectors/track */
+ u_int16_t secsiz; /* Number of bytes/sector */
+ u_int32_t disksize; /* total number sectors */
} params;
struct diskslices *dk_slices; /* virtual drives */
struct buf_queue_head buf_queue;
@@ -102,9 +102,9 @@ struct scsi_data {
static errval od_get_parms __P((int unit, int flags));
static errval od_reassign_blocks __P((int unit, int block));
-static u_int32 od_size __P((int unit, int flags));
+static u_int32_t od_size __P((int unit, int flags));
static int od_sense_handler __P((struct scsi_xfer *));
-static void odstart __P((u_int32, u_int32));
+static void odstart __P((u_int32_t, u_int32_t));
static void odstrategy1 __P((struct buf *));
static dev_t odsetunit(dev_t dev, int unit) { return ODSETUNIT(dev, unit); }
@@ -207,7 +207,7 @@ od_registerdev(int unit)
static errval
odattach(struct scsi_link *sc_link)
{
- u_int32 unit;
+ u_int32_t unit;
struct disk_parms *dp;
#ifdef DEVFS
char name[32];
@@ -281,7 +281,7 @@ od_open(dev, mode, fmt, p, sc_link)
struct scsi_link *sc_link;
{
errval errcode = 0;
- u_int32 unit;
+ u_int32_t unit;
struct disklabel label;
struct scsi_data *od;
@@ -423,9 +423,9 @@ od_close(dev, fflag, fmt, p, sc_link)
static void
od_strategy(struct buf *bp, struct scsi_link *sc_link)
{
- u_int32 opri;
+ u_int32_t opri;
struct scsi_data *od;
- u_int32 unit;
+ u_int32_t unit;
odstrats++;
unit = ODUNIT((bp->b_dev));
@@ -514,13 +514,13 @@ odstrategy1(struct buf *bp)
* odstart() is called at SPLOD from odstrategy and scsi_done
*/
static void
-odstart(u_int32 unit, u_int32 flags)
+odstart(u_int32_t unit, u_int32_t flags)
{
register struct scsi_link *sc_link = SCSI_LINK(&od_switch, unit);
register struct scsi_data *od = sc_link->sd;
struct buf *bp = 0;
struct scsi_rw_big cmd;
- u_int32 blkno, nblk;
+ u_int32_t blkno, nblk;
SC_DEBUG(sc_link, SDEV_DB2, ("odstart "));
/*
@@ -651,13 +651,13 @@ od_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
/*
* Find out from the device what it's capacity is
*/
-static u_int32
+static u_int32_t
od_size(unit, flags)
int unit, flags;
{
struct scsi_read_cap_data rdcap;
struct scsi_read_capacity scsi_cmd;
- u_int32 size;
+ u_int32_t size;
struct scsi_link *sc_link = SCSI_LINK(&od_switch, unit);
/*
@@ -738,7 +738,7 @@ od_get_parms(unit, flags)
struct scsi_link *sc_link = SCSI_LINK(&od_switch, unit);
struct scsi_data *od = sc_link->sd;
struct disk_parms *disk_parms = &od->params;
- u_int32 sectors;
+ u_int32_t sectors;
errval retval;
/*
diff --git a/sys/scsi/pt.c b/sys/scsi/pt.c
index 453060d..1195e72 100644
--- a/sys/scsi/pt.c
+++ b/sys/scsi/pt.c
@@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pt.c,v 1.12 1995/12/14 19:51:13 bde Exp $
+ * $Id: pt.c,v 1.13 1996/01/05 20:12:43 wollman Exp $
*/
/*
@@ -77,7 +77,7 @@ static struct cdevsw pt_cdevsw =
SCSI_DEVICE_ENTRIES(pt)
-static void ptstart(u_int32 unit, u_int32 flags);
+static void ptstart(u_int32_t unit, u_int32_t flags);
static void pt_strategy(struct buf *bp, struct scsi_link *sc_link);
static int pt_sense(struct scsi_xfer *scsi_xfer);
@@ -120,8 +120,8 @@ static struct scsi_device pt_switch =
*/
static void
ptstart(unit, flags)
- u_int32 unit;
- u_int32 flags;
+ u_int32_t unit;
+ u_int32_t flags;
{
struct scsi_link *sc_link = SCSI_LINK(&pt_switch, unit);
struct scsi_data *pt = sc_link->sd;
@@ -195,7 +195,7 @@ static void
pt_strategy(struct buf *bp, struct scsi_link *sc_link)
{
unsigned char unit;
- u_int32 opri;
+ u_int32_t opri;
struct scsi_data *pt;
unit = minor((bp->b_dev));
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 20bcc30..f6a150e 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))
diff --git a/sys/scsi/scsi_driver.c b/sys/scsi/scsi_driver.c
index 45f2ca2..49fddbe 100644
--- a/sys/scsi/scsi_driver.c
+++ b/sys/scsi/scsi_driver.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_driver.c,v 1.12 1995/12/05 07:14:23 julian Exp $
+ * $Id: scsi_driver.c,v 1.13 1996/01/20 15:05:50 joerg Exp $
*
*/
#include <sys/types.h>
@@ -108,7 +108,7 @@ scsi_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_device *device)
{
errval errcode;
- u_int32 unit;
+ u_int32_t unit;
struct scsi_link *sc_link;
if (device == 0)
@@ -164,7 +164,7 @@ struct scsi_device *device)
}
int
-scsi_ioctl(dev_t dev, u_int32 cmd, caddr_t arg, int flags, struct proc *p,
+scsi_ioctl(dev_t dev, u_int32_t cmd, caddr_t arg, int flags, struct proc *p,
struct scsi_device *device)
{
errval errcode;
@@ -188,7 +188,7 @@ scsi_minphys(struct buf *bp, struct scsi_device *device)
void
scsi_strategy(struct buf *bp, struct scsi_device *device)
{
- u_int32 unit = GETUNIT(device, bp->b_dev);
+ u_int32_t unit = GETUNIT(device, bp->b_dev);
struct scsi_link *sc_link = SCSI_LINK(device, unit);
SC_DEBUG(sc_link, SDEV_DB2, ("\n%sstrategy ", device->name));
diff --git a/sys/scsi/scsi_driver.h b/sys/scsi/scsi_driver.h
index 86e9185..c304cf2 100644
--- a/sys/scsi/scsi_driver.h
+++ b/sys/scsi/scsi_driver.h
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_driver.h,v 1.4 1995/05/30 08:13:39 rgrimes Exp $
+ * $Id: scsi_driver.h,v 1.5 1995/11/04 13:25:22 bde Exp $
*
*/
#ifndef _SCSI__DRIVER_H_
@@ -56,7 +56,7 @@ int scsi_device_attach __P((struct scsi_link *));
int scsi_open __P((dev_t, int, int, struct proc *, struct scsi_device *));
int scsi_close __P((dev_t, int, int, struct proc *, struct scsi_device *));
-int scsi_ioctl __P((dev_t, u_int32, caddr_t, int, struct proc *,
+int scsi_ioctl __P((dev_t, u_int32_t, caddr_t, int, struct proc *,
struct scsi_device *));
void scsi_strategy __P((struct buf *, struct scsi_device *));
void scsi_minphys __P((struct buf *, struct scsi_device *));
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c
index e93ef24..56431ce 100644
--- a/sys/scsi/scsi_ioctl.c
+++ b/sys/scsi/scsi_ioctl.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*End copyright
*
- * $Id: scsi_ioctl.c,v 1.19 1996/01/05 20:12:46 wollman Exp $
+ * $Id: scsi_ioctl.c,v 1.20 1996/03/02 01:49:47 dyson Exp $
*
*
*/
@@ -156,7 +156,7 @@ scsistrategy(struct buf *bp)
errval err;
struct scsi_link *sc_link = bp->b_sc_link;
scsireq_t *screq;
- u_int32 flags = 0;
+ u_int32_t flags = 0;
int s;
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 6ccc0694..c3c496f 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
- * $Id: scsiconf.c,v 1.55 1996/02/19 09:26:07 julian Exp $
+ * $Id: scsiconf.c,v 1.56 1996/03/09 07:13:57 peter Exp $
*/
#include "opt_scsi.h"
@@ -165,15 +165,15 @@ static struct extend_array *scbusses;
* The structure of known drivers for autoconfiguration
*/
struct scsidevs {
- u_int32 type;
- u_int32 driver; /* normally the same as type */
+ u_int32_t type;
+ u_int32_t driver; /* normally the same as type */
boolean removable;
char *manufacturer;
char *model;
char *version;
char *devname;
char flags; /* 1 show my comparisons during boot(debug) */
- u_int16 quirks;
+ u_int16_t quirks;
void *devmodes;
};
@@ -380,7 +380,7 @@ static struct scsidevs knowndevs[] =
*/
static struct scsidevs *scsi_probedev __P((struct scsi_link *sc_link,
boolean *maybe_more, int *type_p));
-static struct scsidevs *scsi_selectdev __P((u_int32 qualifier, u_int32 type,
+static struct scsidevs *scsi_selectdev __P((u_int32_t qualifier, u_int32_t type,
boolean remov, char *manu, char *model,
char *rev));
@@ -754,7 +754,7 @@ scsi_probe_busses(int bus, int targ, int lun)
static int
scsi_alloc_unit(struct scsi_link *sc_link)
{
- u_int32 unit;
+ u_int32_t unit;
struct scsi_data *sd;
struct scsi_device *dsw;
@@ -949,7 +949,7 @@ scsi_probe_bus(int bus, int targ, int lun)
struct scsibus_data *scsibus_data ;
int maxtarg,mintarg,maxlun,minlun;
struct scsi_link *sc_link_proto;
- u_int8 scsi_addr ;
+ u_int8_t scsi_addr ;
struct scsidevs *bestmatch = NULL;
struct scsi_link *sc_link = NULL;
boolean maybe_more;
@@ -1089,14 +1089,14 @@ scsi_probedev(sc_link, maybe_more, type_p)
struct scsi_link *sc_link;
int *type_p;
{
- u_int8 target = sc_link->target;
- u_int8 lu = sc_link->lun;
+ u_int8_t target = sc_link->target;
+ u_int8_t lu = sc_link->lun;
struct scsidevs *bestmatch = (struct scsidevs *) 0;
int dtype = 0;
char *desc;
char *qtype;
struct scsi_inquiry_data *inqbuf;
- u_int32 len, qualifier, type;
+ u_int32_t len, qualifier, type;
boolean remov;
char manu[8 + 1];
char model[16 + 1];
@@ -1300,7 +1300,7 @@ match(pattern, name)
*/
static struct scsidevs *
scsi_selectdev(qualifier, type, remov, manu, model, rev)
- u_int32 qualifier, type;
+ u_int32_t qualifier, type;
boolean remov;
char *manu, *model, *rev;
{
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index a21450f..1c607da 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -14,18 +14,12 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: scsiconf.h,v 1.38 1996/01/20 15:05:53 joerg Exp $
+ * $Id: scsiconf.h,v 1.39 1996/02/03 13:31:12 joerg Exp $
*/
#ifndef SCSI_SCSICONF_H
#define SCSI_SCSICONF_H 1
typedef int boolean;
typedef int errval;
-typedef long int int32;
-typedef short int int16;
-typedef char int8;
-typedef unsigned long int u_int32;
-typedef unsigned short int u_int16;
-typedef unsigned char u_int8;
#include <scsi/scsi_debug.h>
#include <scsi/scsi_all.h>
@@ -70,11 +64,11 @@ struct scsi_xfer;
*/
struct scsi_adapter
{
-/* 04*/ int32 (*scsi_cmd) __P((struct scsi_xfer *xs));
+/* 04*/ int32_t (*scsi_cmd) __P((struct scsi_xfer *xs));
/* 08*/ void (*scsi_minphys) __P((struct buf *bp));
-/* 12*/ int32 (*open_target_lu) __P((void));
-/* 16*/ int32 (*close_target_lu) __P((void));
-/* 20*/ u_int32 (*adapter_info) __P((int unit)); /* see definitions below */
+/* 12*/ int32_t (*open_target_lu) __P((void));
+/* 16*/ int32_t (*close_target_lu) __P((void));
+/* 20*/ u_int32_t (*adapter_info) __P((int unit)); /* see definitions below */
/* 24*/ char *name; /* name of scsi bus controller */
/* 32*/ u_long spare[2];
};
@@ -129,14 +123,14 @@ struct scsi_device
{
/* 4*/ errval (*err_handler)(struct scsi_xfer *xs); /* return -1 to say
* err processing complete */
-/* 8*/ void (*start)(u_int32 unit, u_int32 flags);
-/* 12*/ int32 (*async) __P((void));
-/* 16*/ int32 (*done) __P((struct scsi_xfer *xs)); /* returns -1 to say done processing complete */
+/* 8*/ void (*start)(u_int32_t unit, u_int32_t flags);
+/* 12*/ int32_t (*async) __P((void));
+/* 16*/ int32_t (*done) __P((struct scsi_xfer *xs)); /* returns -1 to say done processing complete */
/* 20*/ char *name; /* name of device type */
-/* 24*/ u_int32 flags; /* device type dependent flags */
-/* 32*/ int32 spare[2];
+/* 24*/ u_int32_t flags; /* device type dependent flags */
+/* 32*/ int32_t spare[2];
-/* 36*/ int32 link_flags; /* Flags OR'd into sc_link at attach time */
+/* 36*/ int32_t link_flags; /* Flags OR'd into sc_link at attach time */
/* 40*/ errval (*attach)(struct scsi_link *sc_link);
/* 44*/ char *desc; /* Description of device */
/* 48*/ yet_another_d_open_t *open;
@@ -235,8 +229,8 @@ extern struct scsi_device_config scsi_dinit[];
* and note how they are bad, so we can correct for them
*/
struct st_mode {
-/* 4*/ u_int32 blksiz;
-/* 6*/ u_int16 quirks; /* same definitions as in XXX */
+/* 4*/ u_int32_t blksiz;
+/* 6*/ u_int16_t quirks; /* same definitions as in XXX */
/* 7*/ char density;
/* 8*/ char spare[1];
};
@@ -282,17 +276,17 @@ typedef struct st_mode st_modes[4];
*/
struct scsi_link
{
- u_int8 target; /* targ of this dev */
- u_int8 lun; /* lun of this dev */
- u_int8 adapter_targ; /* what are we on the scsi bus */
- u_int8 adapter_unit; /* e.g. the 0 in aha0 */
- u_int8 adapter_bus; /* e.g. the 0 in bus0 */
- u_int8 scsibus; /* the Nth scsibus */
- u_int8 dev_unit; /* e.g. the 0 in sd0 */
- u_int8 opennings; /* available operations */
- u_int8 active; /* operations in progress */
- u_int16 flags; /* flags that all devices have */
- u_int16 quirks; /* device specific quirks */
+ u_int8_t target; /* targ of this dev */
+ u_int8_t lun; /* lun of this dev */
+ u_int8_t adapter_targ; /* what are we on the scsi bus */
+ u_int8_t adapter_unit; /* e.g. the 0 in aha0 */
+ u_int8_t adapter_bus; /* e.g. the 0 in bus0 */
+ u_int8_t scsibus; /* the Nth scsibus */
+ u_int8_t dev_unit; /* e.g. the 0 in sd0 */
+ u_int8_t opennings; /* available operations */
+ u_int8_t active; /* operations in progress */
+ u_int16_t flags; /* flags that all devices have */
+ u_int16_t quirks; /* device specific quirks */
struct scsi_adapter *adapter; /* adapter entry points etc. */
struct scsi_device *device; /* device entry points etc. */
struct scsi_xfer *active_xs; /* operations under way */
@@ -357,25 +351,25 @@ struct scsibus_data {
struct scsi_xfer
{
/*04*/ struct scsi_xfer *next; /* when free */
-/*08*/ u_int32 flags;
+/*08*/ u_int32_t flags;
/*12*/ struct scsi_link *sc_link; /* all about our device and adapter */
-/*13*/ u_int8 retries; /* the number of times to retry */
-/*16*/ u_int8 spare[3];
-/*20*/ int32 timeout; /* in milliseconds */
+/*13*/ u_int8_t retries; /* the number of times to retry */
+/*16*/ u_int8_t spare[3];
+/*20*/ int32_t timeout; /* in milliseconds */
/*24*/ struct scsi_generic *cmd; /* The scsi command to execute */
-/*28*/ int32 cmdlen; /* how long it is */
+/*28*/ int32_t cmdlen; /* how long it is */
/*32*/ u_char *data; /* dma address OR a uio address */
-/*36*/ int32 datalen; /* data len (blank if uio) */
-/*40*/ int32 resid; /* how much buffer was not touched */
-/*44*/ int32 error; /* an error value */
+/*36*/ int32_t datalen; /* data len (blank if uio) */
+/*40*/ int32_t resid; /* how much buffer was not touched */
+/*44*/ int32_t error; /* an error value */
/*48*/ struct buf *bp; /* If we need to associate with a buf */
/*80*/ struct scsi_sense_data sense; /* 32 bytes*/
/*
* Believe it or not, Some targets fall on the ground with
* anything but a certain sense length.
*/
-/*84*/ int32 req_sense_length; /* Explicit request sense length */
-/*88*/ int32 status; /* SCSI status */
+/*84*/ int32_t req_sense_length; /* Explicit request sense length */
+/*88*/ int32_t status; /* SCSI status */
/*100*/ struct scsi_generic cmdstore; /* stash the command in here */
};
@@ -424,26 +418,26 @@ struct scsi_xfer
#ifdef KERNEL
void *extend_get(struct extend_array *ea, int index);
void scsi_attachdevs __P((struct scsibus_data *scbus));
-u_int32 scsi_read_capacity __P(( struct scsi_link *sc_link,
- u_int32 *blk_size, u_int32 flags));
-errval scsi_test_unit_ready __P(( struct scsi_link *sc_link, u_int32 flags));
+u_int32_t scsi_read_capacity __P(( struct scsi_link *sc_link,
+ u_int32_t *blk_size, u_int32_t flags));
+errval scsi_test_unit_ready __P(( struct scsi_link *sc_link, u_int32_t flags));
errval scsi_reset_target __P((struct scsi_link *));
errval scsi_target_mode __P((struct scsi_link *, int));
errval scsi_inquire( struct scsi_link *sc_link,
- struct scsi_inquiry_data *inqbuf, u_int32 flags);
-errval scsi_prevent( struct scsi_link *sc_link, u_int32 type,u_int32 flags);
+ struct scsi_inquiry_data *inqbuf, u_int32_t flags);
+errval scsi_prevent( struct scsi_link *sc_link, u_int32_t type,u_int32_t flags);
struct scsibus_data *scsi_alloc_bus __P((void));
errval scsi_probe_bus __P((int, int, int));
errval scsi_probe_busses __P(( int, int, int));
-errval scsi_start_unit( struct scsi_link *sc_link, u_int32 flags);
-errval scsi_stop_unit(struct scsi_link *sc_link, u_int32 eject, u_int32 flags);
+errval scsi_start_unit( struct scsi_link *sc_link, u_int32_t flags);
+errval scsi_stop_unit(struct scsi_link *sc_link, u_int32_t eject, u_int32_t flags);
void scsi_done(struct scsi_xfer *xs);
void scsi_user_done(struct scsi_xfer *xs);
errval scsi_scsi_cmd __P(( struct scsi_link *, struct scsi_generic *,
- u_int32, u_char *,
- u_int32, u_int32,
- u_int32, struct buf *,
- u_int32));
+ u_int32_t, u_char *,
+ u_int32_t, u_int32_t,
+ u_int32_t, struct buf *,
+ u_int32_t));
int scsi_do_ioctl __P((dev_t dev, int cmd, caddr_t addr, int mode,
struct proc *p, struct scsi_link *sc_link));
@@ -458,13 +452,13 @@ char *scsi_sense_desc __P((int, int));
void scsi_sense_print __P((struct scsi_xfer *));
void show_scsi_cmd __P((struct scsi_xfer *));
-void scsi_uto3b __P((u_int32 , u_char *));
-u_int32 scsi_3btou __P((u_char *));
-int32 scsi_3btoi __P((u_char *));
-void scsi_uto4b __P((u_int32, u_char *));
-u_int32 scsi_4btou __P((u_char *));
-void scsi_uto2b __P((u_int32, u_char *));
-u_int32 scsi_2btou __P((u_char *));
+void scsi_uto3b __P((u_int32_t , u_char *));
+u_int32_t scsi_3btou __P((u_char *));
+int32_t scsi_3btoi __P((u_char *));
+void scsi_uto4b __P((u_int32_t, u_char *));
+u_int32_t scsi_4btou __P((u_char *));
+void scsi_uto2b __P((u_int32_t, u_char *));
+u_int32_t scsi_2btou __P((u_char *));
void sc_print_addr __P((struct scsi_link *));
void sc_print_start __P((struct scsi_link *));
@@ -482,7 +476,7 @@ void scsi_configure_finish __P((void));
void ukinit __P((void));
#ifdef SCSI_2_DEF
-errval scsi_change_def( struct scsi_link *sc_link, u_int32 flags);
+errval scsi_change_def( struct scsi_link *sc_link, u_int32_t flags);
#endif
#endif /* KERNEL */
diff --git a/sys/scsi/sctarg.c b/sys/scsi/sctarg.c
index 4797d98..b0d0957 100644
--- a/sys/scsi/sctarg.c
+++ b/sys/scsi/sctarg.c
@@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sctarg.c,v 1.12 1995/12/14 19:51:15 bde Exp $
+ * $Id: sctarg.c,v 1.13 1996/01/05 20:12:47 wollman Exp $
*/
/*
@@ -83,7 +83,7 @@ SCSI_DEVICE_ENTRIES(sctarg)
static errval sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link);
-static void sctargstart(u_int32 unit, u_int32 unused_flags);
+static void sctargstart(u_int32_t unit, u_int32_t unused_flags);
static void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link);
static struct scsi_device sctarg_switch =
@@ -161,8 +161,8 @@ sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
*/
static void
sctargstart(unit, unused_flags)
- u_int32 unit;
- u_int32 unused_flags;
+ u_int32_t unit;
+ u_int32_t unused_flags;
{
struct scsi_link *sc_link = SCSI_LINK(&sctarg_switch, unit);
struct scsi_data *sctarg = sc_link->sd;
@@ -177,7 +177,7 @@ sctargstart(unit, unused_flags)
u_char control;
} cmd;
- u_int32 flags;
+ u_int32_t flags;
SC_DEBUG(sc_link, SDEV_DB2, ("sctargstart "));
/*
@@ -237,7 +237,7 @@ static void
sctarg_strategy(struct buf *bp, struct scsi_link *sc_link)
{
unsigned char unit;
- u_int32 opri;
+ u_int32_t opri;
struct scsi_data *sctarg;
unit = minor((bp->b_dev));
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index b9fe20e..35177a1 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.84 1996/01/27 04:18:02 bde Exp $
+ * $Id: sd.c,v 1.85 1996/03/02 18:24:13 peter Exp $
*/
#include "opt_bounce.h"
@@ -48,7 +48,7 @@
#include <machine/md_var.h>
#include <i386/i386/cons.h> /* XXX *//* for aborting dump */
-static u_int32 sdstrats, sdqueues;
+static u_int32_t sdstrats, sdqueues;
#define SECSIZE 512
#define SDOUTSTANDING 4
@@ -64,21 +64,21 @@ static u_int32 sdstrats, sdqueues;
static errval sd_get_parms __P((int unit, int flags));
static errval sd_reassign_blocks __P((int unit, int block));
-static u_int32 sd_size __P((int unit, int flags));
+static u_int32_t sd_size __P((int unit, int flags));
static void sdstrategy1 __P((struct buf *));
static int sd_sense_handler __P((struct scsi_xfer *));
-static void sdstart __P((u_int32, u_int32));
+static void sdstart __P((u_int32_t, u_int32_t));
struct scsi_data {
- u_int32 flags;
+ u_int32_t flags;
#define SDINIT 0x04 /* device has been init'd */
struct disk_parms {
u_char heads; /* Number of heads */
- u_int16 cyls; /* Number of cylinders */
+ u_int16_t cyls; /* Number of cylinders */
u_char sectors; /*dubious *//* Number of sectors/track */
- u_int16 secsiz; /* Number of bytes/sector */
- u_int32 disksize; /* total number sectors */
+ u_int16_t secsiz; /* Number of bytes/sector */
+ u_int32_t disksize; /* total number sectors */
} params;
struct diskslices *dk_slices; /* virtual drives */
struct buf_queue_head buf_queue;
@@ -191,7 +191,7 @@ sd_registerdev(int unit)
static errval
sdattach(struct scsi_link *sc_link)
{
- u_int32 unit;
+ u_int32_t unit;
struct disk_parms *dp;
#ifdef DEVFS
int mynor;
@@ -261,7 +261,7 @@ sd_open(dev, mode, fmt, p, sc_link)
struct scsi_link *sc_link;
{
errval errcode = 0;
- u_int32 unit;
+ u_int32_t unit;
struct disklabel label;
struct scsi_data *sd;
@@ -402,9 +402,9 @@ sd_close(dev, fflag, fmt, p, sc_link)
static void
sd_strategy(struct buf *bp, struct scsi_link *sc_link)
{
- u_int32 opri;
+ u_int32_t opri;
struct scsi_data *sd;
- u_int32 unit;
+ u_int32_t unit;
sdstrats++;
unit = SDUNIT((bp->b_dev));
@@ -500,13 +500,13 @@ sdstrategy1(struct buf *bp)
* sdstart() is called at SPLSD from sdstrategy and scsi_done
*/
static void
-sdstart(u_int32 unit, u_int32 flags)
+sdstart(u_int32_t unit, u_int32_t flags)
{
register struct scsi_link *sc_link = SCSI_LINK(&sd_switch, unit);
register struct scsi_data *sd = sc_link->sd;
struct buf *bp = NULL;
struct scsi_rw_big cmd;
- u_int32 blkno, nblk;
+ u_int32_t blkno, nblk;
SC_DEBUG(sc_link, SDEV_DB2, ("sdstart "));
/*
@@ -637,13 +637,13 @@ sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p,
/*
* Find out from the device what it's capacity is
*/
-static u_int32
+static u_int32_t
sd_size(unit, flags)
int unit, flags;
{
struct scsi_read_cap_data rdcap;
struct scsi_read_capacity scsi_cmd;
- u_int32 size;
+ u_int32_t size;
struct scsi_link *sc_link = SCSI_LINK(&sd_switch, unit);
/*
@@ -729,7 +729,7 @@ sd_get_parms(unit, flags)
struct blk_desc blk_desc;
union disk_pages pages;
} scsi_sense;
- u_int32 sectors;
+ u_int32_t sectors;
/*
* First check if we have it all loaded
@@ -817,7 +817,7 @@ sdsize(dev_t dev)
{
struct scsi_data *sd;
- sd = SCSI_DATA(&sd_switch, (u_int32) SDUNIT(dev));
+ sd = SCSI_DATA(&sd_switch, (u_int32_t) SDUNIT(dev));
if (sd == NULL)
return (-1);
return (dssize(dev, &sd->dk_slices, sdopen, sdclose));
@@ -886,10 +886,10 @@ sddump(dev_t dev)
struct disklabel *lp;
register struct scsi_data *sd; /* disk unit to do the IO */
struct scsi_link *sc_link;
- int32 num; /* number of sectors to write */
- u_int32 unit, part;
- int32 blkoff, blknum, blkcnt = MAXTRANSFER;
- int32 nblocks;
+ int32_t num; /* number of sectors to write */
+ u_int32_t unit, part;
+ int32_t blkoff, blknum, blkcnt = MAXTRANSFER;
+ int32_t nblocks;
char *addr;
struct scsi_rw_big cmd;
static int sddoingadump = 0;
@@ -925,7 +925,7 @@ sddump(dev_t dev)
return (ENXIO);
/* Convert to disk sectors */
- num = (u_int32) num * NBPG / sd->params.secsiz; /* XXX it must be 512 */
+ num = (u_int32_t) num * NBPG / sd->params.secsiz; /* XXX it must be 512 */
/* check if controller active */
if (sddoingadump)
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index c227af9..972217e 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: st.c,v 1.61 1996/02/08 06:23:49 pst Exp $
+ * $Id: st.c,v 1.62 1996/02/19 09:36:23 julian Exp $
*/
/*
@@ -71,26 +71,26 @@
#define SCSI_2_MAX_DENSITY_CODE 0x17 /* maximum density code specified
* in SCSI II spec. */
-static errval st_space __P((u_int32 unit, int32 number, u_int32 what, u_int32 flags));
-static errval st_rewind __P((u_int32 unit, boolean immed, u_int32 flags));
-static errval st_erase __P((u_int32 unit, boolean immed, u_int32 flags));
-static errval st_mode_sense __P((u_int32 unit, u_int32 flags, \
- struct tape_pages *page, u_int32 pagelen, u_int32 pagecode));
-static errval st_decide_mode __P((u_int32 unit, boolean first_read));
-static errval st_read __P((u_int32 unit, char *buf, u_int32 size,
- u_int32 flags));
-static errval st_rd_blk_lim __P((u_int32 unit, u_int32 flags));
-static errval st_touch_tape __P((u_int32 unit));
-static errval st_write_filemarks __P((u_int32 unit, int32 number, u_int32 flags));
-static errval st_load __P((u_int32 unit, u_int32 type, u_int32 flags));
-static errval st_mode_select __P((u_int32 unit, u_int32 flags, \
- struct tape_pages *page, u_int32 pagelen));
-static errval st_comp __P((u_int32 unit, u_int32 mode));
-static int32 st_chkeod __P((u_int32 unit, boolean position, int32 *nmarks,
- u_int32 flags));
-static void ststart(u_int32 unit, u_int32 flags);
+static errval st_space __P((u_int32_t unit, int32_t number, u_int32_t what, u_int32_t flags));
+static errval st_rewind __P((u_int32_t unit, boolean immed, u_int32_t flags));
+static errval st_erase __P((u_int32_t unit, boolean immed, u_int32_t flags));
+static errval st_mode_sense __P((u_int32_t unit, u_int32_t flags, \
+ struct tape_pages *page, u_int32_t pagelen, u_int32_t pagecode));
+static errval st_decide_mode __P((u_int32_t unit, boolean first_read));
+static errval st_read __P((u_int32_t unit, char *buf, u_int32_t size,
+ u_int32_t flags));
+static errval st_rd_blk_lim __P((u_int32_t unit, u_int32_t flags));
+static errval st_touch_tape __P((u_int32_t unit));
+static errval st_write_filemarks __P((u_int32_t unit, int32_t number, u_int32_t flags));
+static errval st_load __P((u_int32_t unit, u_int32_t type, u_int32_t flags));
+static errval st_mode_select __P((u_int32_t unit, u_int32_t flags, \
+ struct tape_pages *page, u_int32_t pagelen));
+static errval st_comp __P((u_int32_t unit, u_int32_t mode));
+static int32_t st_chkeod __P((u_int32_t unit, boolean position, int32_t *nmarks,
+ u_int32_t flags));
+static void ststart(u_int32_t unit, u_int32_t flags);
static void st_unmount __P((int unit, boolean eject));
-static errval st_mount_tape __P((dev_t dev, u_int32 flags));
+static errval st_mount_tape __P((dev_t dev, u_int32_t flags));
static void st_loadquirks __P((struct scsi_link *sc_link));
static errval st_interpret_sense __P((struct scsi_xfer *xs));
@@ -100,24 +100,24 @@ static errval st_interpret_sense __P((struct scsi_xfer *xs));
struct scsi_data {
/*--------------------present operating parameters, flags etc.----------------*/
- u_int32 flags; /* see below */
- u_int32 blksiz; /* blksiz we are using */
- u_int32 density; /* present density */
- u_int32 comp; /* present compression mode */
- u_int32 quirks; /* quirks for the open mode */
- u_int32 last_dsty; /* last density openned */
+ u_int32_t flags; /* see below */
+ u_int32_t blksiz; /* blksiz we are using */
+ u_int32_t density; /* present density */
+ u_int32_t comp; /* present compression mode */
+ u_int32_t quirks; /* quirks for the open mode */
+ u_int32_t last_dsty; /* last density openned */
/*--------------------parameters reported by the device ----------------------*/
- u_int32 blkmin; /* min blk size */
- u_int32 blkmax; /* max blk size */
+ u_int32_t blkmin; /* min blk size */
+ u_int32_t blkmax; /* max blk size */
/*--------------------parameters reported by the device for this media--------*/
- u_int32 numblks; /* nominal blocks capacity */
- u_int32 media_blksiz; /* 0 if not ST_FIXEDBLOCKS */
- u_int32 media_density; /* this is what it said when asked */
+ u_int32_t numblks; /* nominal blocks capacity */
+ u_int32_t media_blksiz; /* 0 if not ST_FIXEDBLOCKS */
+ u_int32_t media_density; /* this is what it said when asked */
/*--------------------quirks for the whole drive------------------------------*/
- u_int32 drive_quirks; /* quirks of this drive */
+ u_int32_t drive_quirks; /* quirks of this drive */
/*--------------------How we should set up when openning each minor device----*/
st_modes modes; /* plus more for each mode */
- u_int8 modeflags[4]; /* flags for the modes */
+ u_int8_t modeflags[4]; /* flags for the modes */
#define DENSITY_SET_BY_USER 0x01
#define DENSITY_SET_BY_QUIRK 0x02
#define BLKSIZE_SET_BY_USER 0x04
@@ -131,7 +131,7 @@ struct scsi_data {
*/
struct buf_queue_head buf_queue;
struct scsi_xfer scsi_xfer; /* scsi xfer struct for this drive */
- u_int32 xfer_block_wait; /* is a process waiting? */
+ u_int32_t xfer_block_wait; /* is a process waiting? */
#ifdef DEVFS
struct {
void *rst;
@@ -273,7 +273,7 @@ st_registerdev(int unit)
static errval
stattach(struct scsi_link *sc_link)
{
- u_int32 unit;
+ u_int32_t unit;
#ifdef DEVFS
char name[32];
#endif
@@ -449,7 +449,7 @@ static errval
st_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
- u_int32 unit, mode, dsty;
+ u_int32_t unit, mode, dsty;
errval errno = 0;
struct scsi_data *st;
@@ -537,7 +537,7 @@ static errval
st_close(dev_t dev, int flag, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
- u_int32 unit, mode;
+ u_int32_t unit, mode;
struct scsi_data *st;
unit = STUNIT(dev);
@@ -576,9 +576,9 @@ st_close(dev_t dev, int flag, int fmt, struct proc *p,
static errval
st_mount_tape(dev, flags)
dev_t dev;
- u_int32 flags;
+ u_int32_t flags;
{
- u_int32 unit, mode, dsty;
+ u_int32_t unit, mode, dsty;
struct scsi_data *st;
struct scsi_link *sc_link;
errval errno = 0;
@@ -682,7 +682,7 @@ st_unmount(int unit, boolean eject)
{
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
struct scsi_data *st = sc_link->sd;
- int32 nmarks;
+ int32_t nmarks;
if (!(st->flags & ST_MOUNTED))
return;
@@ -703,7 +703,7 @@ st_unmount(int unit, boolean eject)
*/
static errval
st_decide_mode(unit, first_read)
- u_int32 unit;
+ u_int32_t unit;
boolean first_read;
{
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
@@ -842,8 +842,8 @@ done:
static void
st_strategy(struct buf *bp, struct scsi_link *sc_link)
{
- u_int32 unit;
- u_int32 opri;
+ u_int32_t unit;
+ u_int32_t opri;
struct scsi_data *st;
int len;
@@ -940,8 +940,8 @@ done:
*/
static void
ststart(unit, flags)
- u_int32 unit;
- u_int32 flags;
+ u_int32_t unit;
+ u_int32_t flags;
{
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
struct scsi_data *st = sc_link->sd;
@@ -1073,12 +1073,12 @@ st_ioctl(dev_t dev, int cmd, caddr_t arg, int flag,
struct proc *p, struct scsi_link *sc_link)
{
errval errcode = 0;
- u_int32 unit;
- u_int32 number, flags, dsty;
+ u_int32_t unit;
+ u_int32_t number, flags, dsty;
struct scsi_data *st;
- u_int32 hold_blksiz;
- u_int32 hold_density;
- int32 nmarks;
+ u_int32_t hold_blksiz;
+ u_int32_t hold_density;
+ int32_t nmarks;
struct mtop *mt = (struct mtop *) arg;
/*
@@ -1262,7 +1262,7 @@ try_new_value:
*/
static errval
st_read(unit, buf, size, flags)
- u_int32 unit, size, flags;
+ u_int32_t unit, size, flags;
char *buf;
{
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
@@ -1305,7 +1305,7 @@ st_read(unit, buf, size, flags)
*/
static errval
st_rd_blk_lim(unit, flags)
- u_int32 unit, flags;
+ u_int32_t unit, flags;
{
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
struct scsi_data *st = sc_link->sd;
@@ -1359,11 +1359,11 @@ st_rd_blk_lim(unit, flags)
*/
static errval
st_mode_sense(unit, flags, page, pagelen, pagecode)
- u_int32 unit, flags;
+ u_int32_t unit, flags;
struct tape_pages *page;
- u_int32 pagelen,pagecode;
+ u_int32_t pagelen,pagecode;
{
- u_int32 dat_len;
+ u_int32_t dat_len;
errval errno;
struct scsi_mode_sense scsi_cmd;
struct {
@@ -1447,11 +1447,11 @@ st_mode_sense(unit, flags, page, pagelen, pagecode)
*/
static errval
st_mode_select(unit, flags, page, pagelen)
- u_int32 unit, flags;
+ u_int32_t unit, flags;
struct tape_pages *page;
- u_int32 pagelen;
+ u_int32_t pagelen;
{
- u_int32 dat_len;
+ u_int32_t dat_len;
struct scsi_mode_select scsi_cmd;
struct {
struct scsi_mode_header header;
@@ -1514,7 +1514,7 @@ static int noisy_st = 0;
\***************************************************************/
static errval
st_comp(unit,mode)
-u_int32 unit,mode;
+u_int32_t unit,mode;
{
struct tape_pages page;
int pagesize;
@@ -1563,8 +1563,8 @@ u_int32 unit,mode;
*/
static errval
st_space(unit, number, what, flags)
- u_int32 unit, what, flags;
- int32 number;
+ u_int32_t unit, what, flags;
+ int32_t number;
{
errval error;
struct scsi_space scsi_cmd;
@@ -1648,8 +1648,8 @@ st_space(unit, number, what, flags)
*/
static errval
st_write_filemarks(unit, number, flags)
- u_int32 unit, flags;
- int32 number;
+ u_int32_t unit, flags;
+ int32_t number;
{
struct scsi_write_filemarks scsi_cmd;
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
@@ -1698,12 +1698,12 @@ st_write_filemarks(unit, number, flags)
* nmarks returns the number of marks to skip (or, if position
* true, which were skipped) to get back original position.
*/
-static int32
+static int32_t
st_chkeod(unit, position, nmarks, flags)
- u_int32 unit;
+ u_int32_t unit;
boolean position;
- int32 *nmarks;
- u_int32 flags;
+ int32_t *nmarks;
+ u_int32_t flags;
{
errval error;
struct scsi_data *st = SCSI_DATA(&st_switch, unit);
@@ -1730,7 +1730,7 @@ st_chkeod(unit, position, nmarks, flags)
*/
static errval
st_load(unit, type, flags)
- u_int32 unit, type, flags;
+ u_int32_t unit, type, flags;
{
struct scsi_load scsi_cmd;
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
@@ -1739,7 +1739,7 @@ st_load(unit, type, flags)
bzero(&scsi_cmd, sizeof(scsi_cmd));
if (type != LD_LOAD) {
errval error;
- int32 nmarks;
+ int32_t nmarks;
error = st_chkeod(unit, FALSE, &nmarks, flags);
if (error != ESUCCESS)
@@ -1766,14 +1766,14 @@ st_load(unit, type, flags)
*/
static errval
st_rewind(unit, immed, flags)
- u_int32 unit, flags;
+ u_int32_t unit, flags;
boolean immed;
{
struct scsi_rewind scsi_cmd;
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
struct scsi_data *st = sc_link->sd;
errval error;
- int32 nmarks;
+ int32_t nmarks;
error = st_chkeod(unit, FALSE, &nmarks, flags);
if (error != ESUCCESS)
@@ -1798,14 +1798,14 @@ st_rewind(unit, immed, flags)
*/
static errval
st_erase(unit, immed, flags)
- u_int32 unit, flags;
+ u_int32_t unit, flags;
boolean immed;
{
struct scsi_erase scsi_cmd;
struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit);
struct scsi_data *st = sc_link->sd;
errval error;
- int32 nmarks;
+ int32_t nmarks;
error = st_chkeod(unit, FALSE, &nmarks, flags);
if (error != ESUCCESS)
@@ -1847,16 +1847,16 @@ st_interpret_sense(xs)
struct scsi_link *sc_link = xs->sc_link;
struct scsi_sense_data *sense = &(xs->sense);
boolean silent = xs->flags & SCSI_SILENT;
- u_int32 unit = sc_link->dev_unit;
+ u_int32_t unit = sc_link->dev_unit;
struct scsi_data *st = SCSI_DATA(&st_switch, unit);
- u_int32 key;
- int32 info;
+ u_int32_t key;
+ int32_t info;
/*
* Get the sense fields and work out what code
*/
if (sense->error_code & SSD_ERRCODE_VALID) {
- info = ntohl(*((int32 *) sense->ext.extended.info));
+ info = ntohl(*((int32_t *) sense->ext.extended.info));
} else {
if (st->flags & ST_FIXEDBLOCKS) {
info = xs->datalen / st->blksiz;
@@ -1981,11 +1981,11 @@ st_interpret_sense(xs)
*/
static errval
st_touch_tape(unit)
- u_int32 unit;
+ u_int32_t unit;
{
struct scsi_data *st = SCSI_DATA(&st_switch, unit);
char *buf;
- u_int32 readsiz;
+ u_int32_t readsiz;
errval errno;
buf = malloc(1024, M_TEMP, M_NOWAIT);
diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c
index 36be929..ec710d4 100644
--- a/sys/scsi/worm.c
+++ b/sys/scsi/worm.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: worm.c,v 1.23 1996/01/29 19:46:26 joerg Exp $
+ * $Id: worm.c,v 1.24 1996/02/02 22:59:48 joerg Exp $
*/
/* XXX This is PRELIMINARY.
@@ -99,8 +99,8 @@ struct worm_quirks
struct scsi_data
{
struct buf_queue_head buf_queue;
- u_int32 n_blks; /* Number of blocks (0 for bogus) */
- u_int32 blk_size; /* Size of each blocks */
+ u_int32_t n_blks; /* Number of blocks (0 for bogus) */
+ u_int32_t blk_size; /* Size of each blocks */
#ifdef DEVFS
void *devfs_token; /* more elaborate later */
#endif
@@ -112,13 +112,13 @@ struct scsi_data
u_int8 audio; /* write audio data */
u_int8 preemp; /* audio only: use preemphasis */
- u_int32 worm_flags; /* driver-internal flags */
+ u_int32_t worm_flags; /* driver-internal flags */
#define WORMFL_DISK_PREPED 0x01 /* disk parameters have been spec'ed */
#define WORMFL_TRACK_PREPED 0x02 /* track parameters have been spec'ed */
#define WORMFL_WRITTEN 0x04 /* track has been written */
};
-static void wormstart(u_int32 unit, u_int32 flags);
+static void wormstart(u_int32_t unit, u_int32_t flags);
static errval worm_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link);
@@ -128,7 +128,7 @@ static errval worm_close(dev_t dev, int flag, int fmt, struct proc *p,
struct scsi_link *sc_link);
static void worm_strategy(struct buf *bp, struct scsi_link *sc_link);
-static errval worm_quirk_select(struct scsi_link *sc_link, u_int32 unit,
+static errval worm_quirk_select(struct scsi_link *sc_link, u_int32_t unit,
struct wormio_quirk_select *);
static errval worm_rezero_unit(struct scsi_link *sc_link);
@@ -283,16 +283,16 @@ wormattach(struct scsi_link *sc_link)
*/
static void
wormstart(unit, flags)
- u_int32 unit;
- u_int32 flags;
+ u_int32_t unit;
+ u_int32_t flags;
{
struct scsi_link *sc_link = SCSI_LINK(&worm_switch, unit);
struct scsi_data *worm = sc_link->sd;
register struct buf *bp = 0;
struct scsi_rw_big cmd;
- u_int32 lba; /* Logical block address */
- u_int32 tl; /* Transfer length */
+ u_int32_t lba; /* Logical block address */
+ u_int32_t tl; /* Transfer length */
SC_DEBUG(sc_link, SDEV_DB2, ("wormstart "));
@@ -371,7 +371,7 @@ static void
worm_strategy(struct buf *bp, struct scsi_link *sc_link)
{
unsigned char unit;
- u_int32 opri;
+ u_int32_t opri;
struct scsi_data *worm;
unit = wormunit(bp->b_dev);
@@ -650,7 +650,7 @@ worm_rezero_unit(struct scsi_link *sc_link)
}
static errval
-worm_quirk_select(struct scsi_link *sc_link, u_int32 unit,
+worm_quirk_select(struct scsi_link *sc_link, u_int32_t unit,
struct wormio_quirk_select *qs)
{
struct worm_quirks *qp;
@@ -764,7 +764,7 @@ rf4100_prepare_disk(struct scsi_link *sc_link, int dummy, int speed)
struct scsi_mode_header header;
struct plasmon_rf4100_pages page;
} dat;
- u_int32 pagelen, dat_len;
+ u_int32_t pagelen, dat_len;
pagelen = sizeof(dat.page.pages.page_0x23) + PAGE_HEADERLEN;
dat_len = sizeof(struct scsi_mode_header) + pagelen;
@@ -810,7 +810,7 @@ rf4100_prepare_track(struct scsi_link *sc_link, int audio, int preemp)
struct blk_desc blk_desc;
struct plasmon_rf4100_pages page;
} dat;
- u_int32 pagelen, dat_len, blk_len;
+ u_int32_t pagelen, dat_len, blk_len;
pagelen = sizeof(dat.page.pages.page_0x21) + PAGE_HEADERLEN;
dat_len = sizeof(struct scsi_mode_header)
@@ -996,7 +996,7 @@ hp4020i_prepare_disk(struct scsi_link *sc_link, int dummy, int speed)
struct scsi_mode_header header;
struct hp_4020i_pages page;
} dat;
- u_int32 pagelen, dat_len;
+ u_int32_t pagelen, dat_len;
pagelen = sizeof(dat.page.pages.page_0x23) + PAGE_HEADERLEN;
dat_len = sizeof(struct scsi_mode_header) + pagelen;
@@ -1043,7 +1043,7 @@ hp4020i_prepare_track(struct scsi_link *sc_link, int audio, int preemp)
struct blk_desc blk_desc;
struct hp_4020i_pages page;
} dat;
- u_int32 pagelen, dat_len, blk_len;
+ u_int32_t pagelen, dat_len, blk_len;
pagelen = sizeof(dat.page.pages.page_0x21) + PAGE_HEADERLEN;
dat_len = sizeof(struct scsi_mode_header)
OpenPOWER on IntegriCloud