Module Name:    othersrc
Committed By:   riz
Date:           Thu Jun  9 22:08:20 UTC 2011

Modified Files:
        othersrc/external/bsd/iscsi/sys/dev/iscsi: iscsi.h iscsi_globals.h
            iscsi_ioctl.c iscsi_ioctl.h iscsi_main.c iscsi_perf.h iscsi_rcv.c
            iscsi_send.c iscsi_test.c iscsi_test.h iscsi_testlocal.h
            iscsi_text.c iscsi_utils.c

Log Message:
CADDR_T -> void *
boolean_t -> bool
struct device * -> device_t
struct cfdata * -> caddr_t
CFATTACH_DECL -> CFATTACH_DECL_NEW


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.c \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.h \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_testlocal.h
cvs rdiff -u -r1.2 -r1.3 \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_globals.h \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_send.c \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_text.c \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_utils.c
cvs rdiff -u -r1.3 -r1.4 \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.c \
    othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h:1.2
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h:1.1.1.1	Mon May  2 07:01:09 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi.h	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi.h,v 1.1.1.1 2011/05/02 07:01:09 agc Exp $	*/
+/*	$NetBSD: iscsi.h,v 1.2 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2004,2006,2011 The NetBSD Foundation, Inc.
@@ -214,11 +214,4 @@
 #define ISCSID_STATUS_INVALID_INITIATOR_ID   1115	/* Initiator ID not found */
 #define ISCSID_STATUS_INITIATOR_BIND_ERROR   1116	/* Bind to initiator portal failed */
 
-#if (__NetBSD_Version__ > 500000000)
-#define CADDR_T	void *
-#else
-#define CADDR_T	caddr_t
-#endif
-
-
 #endif /* !_ISCSI_H */
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h:1.2
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h:1.1.1.1	Mon May  2 07:01:11 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.h	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_ioctl.h,v 1.1.1.1 2011/05/02 07:01:11 agc Exp $	*/
+/*	$NetBSD: iscsi_ioctl.h,v 1.2 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -66,11 +66,11 @@
 	uint16_t DefaultTime2Wait;
 	uint16_t DefaultTime2Retain;
 	uint16_t ErrorRecoveryLevel;
-	CADDR_T user_name;
-	CADDR_T password;
-	CADDR_T target_password;
-	CADDR_T TargetName;
-	CADDR_T TargetAlias;
+	void *user_name;
+	void *password;
+	void *target_password;
+	void *TargetName;
+	void *TargetAlias;
 } iscsi_login_parameters_t;
 
 /*
@@ -234,7 +234,7 @@
          u_long   timeout;
          uint8_t   cmd[16];
          uint8_t   cmdlen;
-         CADDR_T  databuf;
+         void * databuf;
          u_long   datalen;
          u_long   datalen_used;
          uint8_t   sense[SENSEBUFLEN];
@@ -281,7 +281,7 @@
 typedef struct {
 	uint32_t status;
 	uint32_t session_id;
-	CADDR_T response_buffer;
+	void *response_buffer;
 	uint32_t response_size;
 	uint32_t response_used;
 	uint32_t response_total;
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h:1.2
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h:1.1.1.1	Mon May  2 07:01:11 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_perf.h	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_perf.h,v 1.1.1.1 2011/05/02 07:01:11 agc Exp $	*/
+/*	$NetBSD: iscsi_perf.h,v 1.2 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
 
 typedef struct
 {
-	CADDR_T buffer;				/* in: buffer pointer */
+	void *buffer;				/* in: buffer pointer */
 	uint32_t buffersize;		/* in: size of buffer in bytes (0 to query size) */
 	uint32_t status;			/* out: status */
 	int num_elements;			/* out: number of elements written */
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c:1.2
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c:1.1.1.1	Mon May  2 07:01:12 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_rcv.c	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_rcv.c,v 1.1.1.1 2011/05/02 07:01:12 agc Exp $	*/
+/*	$NetBSD: iscsi_rcv.c,v 1.2 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -313,7 +313,7 @@
  */
 
 STATIC int
-check_StatSN(connection_t *conn, uint32_t nw_sn, boolean_t ack)
+check_StatSN(connection_t *conn, uint32_t nw_sn, bool ack)
 {
 	int rc;
 	uint32_t sn = ntohl(nw_sn);
@@ -503,7 +503,7 @@
 STATIC int
 receive_logout_pdu(connection_t *conn, pdu_t *pdu, ccb_t *req_ccb)
 {
-	boolean_t otherconn;
+	bool otherconn;
 	uint8_t response;
 
 	otherconn = (req_ccb != NULL) ? (req_ccb->flags & CCBF_OTHERCONN) != 0 : 1;
@@ -574,7 +574,7 @@
 receive_data_in_pdu(connection_t *conn, pdu_t *pdu, ccb_t *req_ccb)
 {
 	uint32_t dsl, sn;
-	boolean_t done;
+	bool done;
 	int rc;
 
 	dsl = ntoh3(pdu->pdu.DataSegmentLength);
@@ -692,7 +692,7 @@
 receive_command_response_pdu(connection_t *conn, pdu_t *pdu, ccb_t *req_ccb)
 {
 	int len, rc;
-	boolean_t done;
+	bool done;
 
 	/* Read any provided data */
 	if (pdu->temp_data_len && req_ccb != NULL && req_ccb->sense_len_req) {
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.c
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.c:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.c:1.2
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.c:1.1.1.1	Mon May  2 07:01:13 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.c	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_test.c,v 1.1.1.1 2011/05/02 07:01:13 agc Exp $	*/
+/*	$NetBSD: iscsi_test.c,v 1.2 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2006,2011 The NetBSD Foundation, Inc.
@@ -737,7 +737,7 @@
  */
 
 STATIC uint32_t
-add_neg(test_pars_t *tp, CADDR_T addr, uint32_t len)
+add_neg(test_pars_t *tp, void *addr, uint32_t len)
 {
 	neg_desc_t *negp;
 	uint32_t size;
@@ -883,7 +883,7 @@
 	mod_desc_t *modp;
 	uint32_t len;
 	uint32_t psize = par->pdu_size;
-	CADDR_T pdu_ptr = par->pdu_ptr;
+	void *pdu_ptr = par->pdu_ptr;
 
 	if ((tp = find_test_id(par->test_id)) == NULL) {
 		par->status = ISCSI_STATUS_INVALID_ID;
@@ -976,7 +976,7 @@
 	connection_t *conn;
 	pdu_t *pdu;
 	uint32_t psize = par->pdu_size;
-	CADDR_T pdu_ptr = par->pdu_ptr;
+	void *pdu_ptr = par->pdu_ptr;
 	struct uio *uio;
 	uint32_t i, pad, dsl, size;
 
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.h
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.h:1.2
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.h:1.1.1.1	Mon May  2 07:01:13 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_test.h	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_test.h,v 1.1.1.1 2011/05/02 07:01:13 agc Exp $	*/
+/*	$NetBSD: iscsi_test.h,v 1.2 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2006,2011 The NetBSD Foundation, Inc.
@@ -192,7 +192,7 @@
 	uint32_t maxburst_val;		/* Used only if NEGOTIATE_MAXBURST */
 	uint32_t firstburst_val;	/* Used only if NEGOTIATE_FIRSTBURST */
 	uint32_t neg_descriptor_size;	/* Size of negotiation descriptor (may be 0) */
-	CADDR_T neg_descriptor_ptr;	/* pointer to negotiation descriptor */
+	void *neg_descriptor_ptr;	/* pointer to negotiation descriptor */
 	uint32_t status;			/* Out: Status */
 } iscsi_test_define_parameters_t;
 
@@ -211,7 +211,7 @@
 	uint32_t num_pdu_mods;		/* How many PDU modifications */
 	iscsi_pdu_mod_t *mod_ptr;	/* pointer to modifications */
 	uint32_t pdu_size;			/* size of PDU buffer for get */
-	CADDR_T pdu_ptr;			/* pointer to PDU buffer */
+	void *pdu_ptr;			/* pointer to PDU buffer */
 	uint32_t pdu_actual_size;	/* Out: actual size of PDU */
 	uint32_t status;			/* Out: Status */
 } iscsi_test_add_modification_parameters_t;
@@ -223,7 +223,7 @@
 {
 	uint32_t test_id;			/* Test ID */
 	uint32_t neg_descriptor_size;	/* Size of negotiation descriptor (may be 0) */
-	CADDR_T neg_descriptor_ptr;	/* pointer to negotiation descriptor */
+	void *neg_descriptor_ptr;	/* pointer to negotiation descriptor */
 	uint32_t status;			/* Out: Status */
 } iscsi_test_add_negotiation_parameters_t;
 
@@ -247,7 +247,7 @@
 	uint32_t test_id;			/* Test ID */
 	uint32_t options;			/* Test options */
 	uint32_t pdu_size;			/* size of PDU */
-	CADDR_T pdu_ptr;			/* pointer to PDU */
+	void *pdu_ptr;				/* pointer to PDU */
 	uint32_t status;			/* Out: Status */
 } iscsi_test_send_pdu_parameters_t;
 
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_testlocal.h
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_testlocal.h:1.1.1.1 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_testlocal.h:1.2
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_testlocal.h:1.1.1.1	Mon May  2 07:01:13 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_testlocal.h	Thu Jun  9 22:08:19 2011
@@ -1,5 +1,5 @@
 /*	$wasabi: iscsi_testlocal.h,v 1.5 2006/05/30 23:22:20 twagner Exp $ */
-/*	$NetBSD: iscsi_testlocal.h,v 1.1.1.1 2011/05/02 07:01:13 agc Exp $	*/
+/*	$NetBSD: iscsi_testlocal.h,v 1.2 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2006,2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 typedef struct mod_desc_s
 {
 	TAILQ_ENTRY(mod_desc_s) link;
-	CADDR_T pdu_ptr;			/* get only */
+	void *pdu_ptr;			/* get only */
 	iscsi_test_add_modification_parameters_t pars;
 	iscsi_pdu_mod_t mods[0];
 } mod_desc_t;

Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_globals.h
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_globals.h:1.2 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_globals.h:1.3
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_globals.h:1.2	Tue Jun  7 23:47:51 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_globals.h	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_globals.h,v 1.2 2011/06/07 23:47:51 riz Exp $	*/
+/*	$NetBSD: iscsi_globals.h,v 1.3 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -296,7 +296,7 @@
 	uint64_t		lun; /* LUN */
 	uint8_t			*cmd; /* SCSI command block */
 	uint16_t		cmdlen; /* SCSI command block length */
-	boolean_t		data_in; /* if this is a read request */
+	bool			data_in; /* if this is a read request */
 	uint8_t			*data_ptr; /* data pointer for read/write */
 	uint32_t		data_len; /* total data length */
 	uint32_t		xfer_len; /* data transferred on read */
@@ -362,8 +362,8 @@
 					/* Target's value */
 	uint32_t			Our_MaxRecvDataSegmentLength;
 					/* Our own value */
-	boolean_t			HeaderDigest;	/* TRUE if doing CRC */
-	boolean_t			DataDigest;	/* TRUE if doing CRC */
+	bool				HeaderDigest;	/* TRUE if doing CRC */
+	bool				DataDigest;	/* TRUE if doing CRC */
 	uint32_t			Time2Wait;
 					/* Negotiated default or logout value */
 	uint32_t			Time2Retain;
@@ -388,8 +388,8 @@
 	int				recover; /* recovery count */
 		/* (reset on first successful data transfer) */
 
-	boolean_t			destroy; /* conn will be destroyed */
-	boolean_t			in_session;
+	bool				destroy; /* conn will be destroyed */
+	bool				in_session;
 		/* if it's linked into the session list */
 	logout_state_t			loggedout;
 		/* status of logout (for recovery) */
@@ -429,7 +429,7 @@
 	struct scsipi_adapter	sc_adapter;
 	struct scsipi_channel	sc_channel;
 
-	struct device		*child_dev;
+	device_t		child_dev;
 	/* the child we're associated with - (NULL if not mapped) */
 
 	/* local stuff */
@@ -450,8 +450,8 @@
 	uint32_t		ErrorRecoveryLevel;
 	uint32_t		FirstBurstLength;
 	uint32_t		MaxBurstLength;
-	boolean_t		ImmediateData;
-	boolean_t		InitialR2T;
+	bool			ImmediateData;
+	bool			InitialR2T;
 	uint32_t		MaxOutstandingR2T;
 	uint32_t		MaxConnections;
 	uint32_t		DefaultTime2Wait;
@@ -497,7 +497,7 @@
 */
 
 typedef struct iscsi_softc {
-	struct device	sc_dev;
+	device_t		sc_dev;
 } iscsi_softc_t;
 
 
@@ -545,7 +545,7 @@
 session_list_t sessions;		/* the list of sessions */
 
 connection_list_t cleanup_list;		/* connections to clean up */
-boolean_t detaching;			/* signal to cleanup thread it should exit */
+bool detaching;			/* signal to cleanup thread it should exit */
 struct lwp *cleanproc;			/* pointer to cleanup proc */
 
 uint32_t num_send_threads;		/* the number of active send threads */
@@ -674,7 +674,7 @@
  * Serial number buffer empty?
 */
 
-static __inline boolean_t
+static __inline bool
 sn_empty(sernum_buffer_t *buf)
 {
 	return buf->top == buf->bottom;
@@ -685,14 +685,14 @@
  * Serial number compare
 */
 
-static __inline boolean_t
+static __inline bool
 sn_a_lt_b(uint32_t a, uint32_t b)
 {
 	return (a < b && !((b - a) & 0x80000000)) ||
 	       (a > b && ((a - b) & 0x80000000));
 }
 
-static __inline boolean_t
+static __inline bool
 sn_a_le_b(uint32_t a, uint32_t b)
 {
 	return (a <= b && !((b - a) & 0x80000000)) ||
@@ -752,17 +752,17 @@
 
 void add_event(iscsi_event_t, uint32_t, uint32_t, uint32_t);
 
-void kill_connection(connection_t *, uint32_t, int, boolean_t);
-void kill_session(session_t *, uint32_t, int, boolean_t);
+void kill_connection(connection_t *, uint32_t, int, bool);
+void kill_session(session_t *, uint32_t, int, bool);
 void kill_all_sessions(void);
 void handle_connection_error(connection_t *, uint32_t, int);
 void iscsi_cleanup_thread(void *);
 
 #ifndef ISCSI_MINIMAL
-uint32_t map_databuf(struct proc *, CADDR_T *, uint32_t);
-void unmap_databuf(struct proc *, CADDR_T, uint32_t);
+uint32_t map_databuf(struct proc *, void **, uint32_t);
+void unmap_databuf(struct proc *, void *, uint32_t);
 #endif
-int iscsiioctl(dev_t, u_long, CADDR_T, int, PTHREADOBJ);
+int iscsiioctl(dev_t, u_long, void *, int, PTHREADOBJ);
 
 session_t *find_session(uint32_t);
 connection_t *find_connection(session_t *, uint32_t);
@@ -771,7 +771,7 @@
 /* in iscsi_main.c */
 
 /*void iscsiattach(void *); */
-int iscsidetach(struct device *, int);
+int iscsidetach(device_t, int);
 
 void iscsi_done(ccb_t *);
 int map_session(session_t *);
@@ -781,11 +781,11 @@
 
 void iscsi_send_thread(void *);
 
-connection_t *assign_connection(session_t *session, boolean_t waitok);
+connection_t *assign_connection(session_t *session, bool waitok);
 void resend_pdu(ccb_t *);
 int send_login(connection_t *);
-int send_logout(connection_t *, connection_t *, int, boolean_t);
-int send_data_out(connection_t *, pdu_t *, ccb_t *, ccb_disp_t, boolean_t);
+int send_logout(connection_t *, connection_t *, int, bool);
+int send_data_out(connection_t *, pdu_t *, ccb_t *, ccb_disp_t, bool);
 void send_run_xfer(session_t *, struct scsipi_xfer *);
 int send_send_targets(session_t *, uint8_t *);
 int send_task_management(connection_t *, ccb_t *, struct scsipi_xfer *, int);
@@ -799,9 +799,9 @@
 void send_snack(connection_t *, pdu_t *, ccb_t *, uint8_t);
 int send_send_targets(session_t *, uint8_t *);
 
-void send_command(ccb_t *, ccb_disp_t, boolean_t, boolean_t);
+void send_command(ccb_t *, ccb_disp_t, bool, bool);
 #ifndef ISCSI_MINIMAL
-int send_io_command(session_t *, uint64_t, scsireq_t *, boolean_t, uint32_t);
+int send_io_command(session_t *, uint64_t, scsireq_t *, bool, uint32_t);
 #endif
 
 void connection_timeout(void *);
@@ -817,14 +817,14 @@
 uint32_t gen_digest_2(void *, int, void *, int);
 
 void create_ccbs(session_t *);
-ccb_t *get_ccb(connection_t *, boolean_t);
+ccb_t *get_ccb(connection_t *, bool);
 void free_ccb(ccb_t *);
 void wake_ccb(ccb_t *);
 void complete_ccb(ccb_t *);
 
 void create_pdus(connection_t *);
 pdu_t *get_pdu(connection_t *);
-pdu_t *get_pdu_c(connection_t *, boolean_t);
+pdu_t *get_pdu_c(connection_t *, bool);
 void free_pdu(pdu_t *);
 
 void init_sernum(sernum_buffer_t *);
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_send.c
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_send.c:1.2 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_send.c:1.3
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_send.c:1.2	Tue Jun  7 23:47:51 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_send.c	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_send.c,v 1.2 2011/06/07 23:47:51 riz Exp $	*/
+/*	$NetBSD: iscsi_send.c,v 1.3 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 connection_t *
-assign_connection(session_t *session, boolean_t waitok)
+assign_connection(session_t *session, bool waitok)
 {
 	connection_t *conn, *next;
 
@@ -555,7 +555,7 @@
  */
 
 STATIC void
-setup_tx_uio(pdu_t *pdu, uint32_t dsl, void *data, boolean_t read)
+setup_tx_uio(pdu_t *pdu, uint32_t dsl, void *data, bool read)
 {
 	static uint8_t pad_bytes[4] = { 0 };
 	struct uio *uio;
@@ -617,7 +617,7 @@
  */
 
 STATIC void
-init_login_pdu(connection_t *conn, pdu_t *ppdu, boolean_t next)
+init_login_pdu(connection_t *conn, pdu_t *ppdu, bool next)
 {
 	pdu_header_t *pdu = &ppdu->pdu;
 	login_isid_t *isid = (login_isid_t *) & pdu->LUN;
@@ -653,7 +653,7 @@
 negotiate_login(connection_t *conn, pdu_t *rx_pdu, ccb_t *tx_ccb)
 {
 	int rc;
-	boolean_t next = TRUE;
+	bool next = TRUE;
 	pdu_t *tx_pdu;
 	uint8_t c_phase;
 
@@ -1140,7 +1140,7 @@
 
 int
 send_logout(connection_t *conn, connection_t *refconn, int reason,
-			boolean_t wait)
+			bool wait)
 {
 	ccb_t *ccb;
 	pdu_t *ppdu;
@@ -1259,7 +1259,7 @@
 
 int
 send_data_out(connection_t *conn, pdu_t *rx_pdu, ccb_t *tx_ccb,
-			  ccb_disp_t disp, boolean_t waitok)
+			  ccb_disp_t disp, bool waitok)
 {
 	pdu_header_t *pdu;
 	uint32_t totlen, len, offs, sn;
@@ -1329,7 +1329,7 @@
  */
 
 void
-send_command(ccb_t *ccb, ccb_disp_t disp, boolean_t waitok, boolean_t immed)
+send_command(ccb_t *ccb, ccb_disp_t disp, bool waitok, bool immed)
 {
 	uint32_t totlen, len;
 	connection_t *conn = ccb->connection;
@@ -1446,7 +1446,7 @@
 {
 	ccb_t *ccb;
 	connection_t *conn;
-	boolean_t waitok;
+	bool waitok;
 
 	waitok = !(xs->xs_control & XS_CTL_NOSLEEP);
 
@@ -1517,7 +1517,7 @@
 
 int
 send_io_command(session_t *session, uint64_t lun, scsireq_t *req,
-				boolean_t immed, uint32_t conn_id)
+				bool immed, uint32_t conn_id)
 {
 	ccb_t *ccb;
 	connection_t *conn;
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_text.c
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_text.c:1.2 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_text.c:1.3
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_text.c:1.2	Tue Jun  7 23:47:51 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_text.c	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_text.c,v 1.2 2011/06/07 23:47:51 riz Exp $	*/
+/*	$NetBSD: iscsi_text.c,v 1.3 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -203,10 +203,10 @@
 	uint8_t user_name[MAX_STRING + 1];		/* authentication user ID */
 	uint8_t temp_buf[MAX_STRING + 1];		/* scratch buffer */
 
-	boolean_t HeaderDigest;
-	boolean_t DataDigest;
-	boolean_t InitialR2T;
-	boolean_t ImmediateData;
+	bool HeaderDigest;
+	bool DataDigest;
+	bool InitialR2T;
+	bool ImmediateData;
 	uint32_t ErrorRecoveryLevel;
 	uint32_t MaxRecvDataSegmentLength;
 	uint32_t MaxConnections;
@@ -1009,7 +1009,7 @@
 	uint32_t n = par->val.nval[0];
 	size_t sz;
 	text_key_t key = par->key;
-	boolean_t sent = (state->kflags[key] & NS_SENT) != 0;
+	bool sent = (state->kflags[key] & NS_SENT) != 0;
 
 	state->kflags[key] |= NS_RECEIVED;
 
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_utils.c
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_utils.c:1.2 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_utils.c:1.3
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_utils.c:1.2	Tue Jun  7 23:47:51 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_utils.c	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_utils.c,v 1.2 2011/06/07 23:47:51 riz Exp $	*/
+/*	$NetBSD: iscsi_utils.c,v 1.3 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2008 The NetBSD Foundation, Inc.
@@ -214,7 +214,7 @@
  */
 
 ccb_t *
-get_ccb(connection_t *conn, boolean_t waitok)
+get_ccb(connection_t *conn, bool waitok)
 {
 	ccb_t *ccb;
 	session_t *sess = conn->session;
@@ -450,7 +450,7 @@
  */
 
 pdu_t *
-get_pdu_c(connection_t *conn, boolean_t waitok)
+get_pdu_c(connection_t *conn, bool waitok)
 {
 	pdu_t *pdu;
 

Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.c
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.c:1.3 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.c:1.4
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.c:1.3	Wed Jun  8 01:57:00 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_ioctl.c	Thu Jun  9 22:08:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_ioctl.c,v 1.3 2011/06/08 01:57:00 riz Exp $	*/
+/*	$NetBSD: iscsi_ioctl.c,v 1.4 2011/06/09 22:08:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
  */
 
 STATIC void
-check_event(iscsi_wait_event_parameters_t *par, boolean_t wait)
+check_event(iscsi_wait_event_parameters_t *par, bool wait)
 {
 	event_handler_t *handler;
 	event_t *evt;
@@ -390,8 +390,7 @@
  */
 
 void
-kill_connection(connection_t *conn, uint32_t status, int logout,
-				boolean_t recover)
+kill_connection(connection_t *conn, uint32_t status, int logout, bool recover)
 {
 	session_t *sess = conn->session;
 
@@ -490,8 +489,7 @@
  */
 
 void
-kill_session(session_t *session, uint32_t status, int logout,
-			 boolean_t recover)
+kill_session(session_t *session, uint32_t status, int logout, bool recover)
 {
 	connection_t *curr;
 	ccb_t *ccb;
@@ -1106,7 +1104,7 @@
  */
 
 uint32_t
-map_databuf(struct proc *p, CADDR_T *buf, uint32_t datalen)
+map_databuf(struct proc *p, void **buf, uint32_t datalen)
 {
 	vaddr_t kva, databuf, offs;
 	int error;
@@ -1134,7 +1132,7 @@
 		return ISCSI_STATUS_NO_RESOURCES;
 	}
 	/* add offset back into kernel VA */
-	*buf = (CADDR_T) (kva + offs);
+	*buf = (void *) (kva + offs);
 
 	return 0;
 }
@@ -1154,7 +1152,7 @@
  */
 
 void
-unmap_databuf(struct proc *p, CADDR_T buf, uint32_t datalen)
+unmap_databuf(struct proc *p, void *buf, uint32_t datalen)
 {
 	struct vm_map_entry *dead_entries;
 	vaddr_t databuf;
@@ -1195,7 +1193,7 @@
 io_command(iscsi_iocommand_parameters_t *par, PTHREADOBJ p)
 {
 	uint32_t datalen = par->req.datalen;
-	CADDR_T databuf = par->req.databuf;
+	void *databuf = par->req.databuf;
 	session_t *session;
 
 	DEB(9, ("ISCSI: io_command, SID=%d, lun=%qx\n", par->session_id, par->lun));
@@ -1536,7 +1534,7 @@
  */
 
 int
-iscsiioctl(dev_t dev, u_long cmd, CADDR_T addr, int flag, PTHREADOBJ p)
+iscsiioctl(dev_t dev, u_long cmd, void *addr, int flag, PTHREADOBJ p)
 {
 
 	DEB(99, ("ISCSI Ioctl cmd = %x\n", (int) cmd));
Index: othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_main.c
diff -u othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_main.c:1.3 othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_main.c:1.4
--- othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_main.c:1.3	Thu Jun  9 01:49:49 2011
+++ othersrc/external/bsd/iscsi/sys/dev/iscsi/iscsi_main.c	Thu Jun  9 22:08:19 2011
@@ -53,7 +53,7 @@
 
 /* connections to clean up */
 connection_list_t cleanup_list = TAILQ_HEAD_INITIALIZER(cleanup_list);
-boolean_t detaching = FALSE;
+bool detaching = FALSE;
 struct lwp *cleanproc = NULL;
 
 /* the number of active send threads (for cleanup thread) */
@@ -70,12 +70,12 @@
    System interface: autoconf and device structures
 */
 
-void iscsiattach(struct device *parent, struct device *self, void *aux);
-int iscsimatch(struct device *, struct cfdata *, void *);
-int iscsidetatch(struct device *, int);
+void iscsiattach(device_t parent, device_t self, void *aux);
+int iscsimatch(device_t, cfdata_t, void *);
+int iscsidetatch(device_t, int);
 
 
-CFATTACH_DECL(iscsi, sizeof(struct iscsi_softc), iscsimatch, iscsiattach,
+CFATTACH_DECL_NEW(iscsi, sizeof(struct iscsi_softc), iscsimatch, iscsiattach,
 			  iscsidetach, NULL);
 
 
@@ -128,7 +128,7 @@
  */
 
 int
-iscsimatch(struct device *self, struct cfdata *cfdata, void *arg)
+iscsimatch(device_t self, cfdata_t cfdata, void *arg)
 {
 	return 1;
 }
@@ -140,14 +140,13 @@
  */
 
 void
-iscsiattach(struct device *parent, struct device *self, void *aux)
+iscsiattach(device_t parent, device_t self, void *aux)
 {
-	struct device *dev;
 
 	DEBOUT(("ISCSI: iscsiattach, parent=%x, self=%x, aux=%x\n", (int)parent,
 			(int) self, (int) aux));
-	sc = (iscsi_softc_t *) self;
-	dev = &sc->sc_dev;
+	sc = (iscsi_softc_t *) device_private(self);
+	sc->sc_dev = self;
 	if (kthread_create(PRI_NONE, 0, NULL, iscsi_cleanup_thread,
 	    NULL, &cleanproc, "Cleanup") != 0) {
 		panic("Can't create cleanup thread!");
@@ -159,7 +158,7 @@
  *    Cleanup.
  */
 int
-iscsidetach(struct device *self, int flags)
+iscsidetach(device_t self, int flags)
 {
 
 	DEBOUT(("ISCSI: detach\n"));
@@ -253,7 +252,7 @@
 	/*
 	 * Fill in the scsipi_adapter.
 	 */
-	adapt->adapt_dev = &sc->sc_dev;
+	adapt->adapt_dev = sc->sc_dev;
 	adapt->adapt_nchannels = 1;
 	adapt->adapt_request = iscsi_scsipi_request;
 	adapt->adapt_minphys = iscsi_minphys;
@@ -276,7 +275,7 @@
 	chan->chan_nluns = 16;		/* ToDo: ??? */
 	chan->chan_id = session->id;
 
-	session->child_dev = config_found(&sc->sc_dev, chan, scsiprint);
+	session->child_dev = config_found(sc->sc_dev, chan, scsiprint);
 
 	return session->child_dev != NULL;
 }
@@ -293,7 +292,7 @@
 void
 unmap_session(session_t *session)
 {
-	struct device *dev;
+	device_t dev;
 
 	if ((dev = session->child_dev) != NULL) {
 		session->child_dev = NULL;

Reply via email to