Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Sep 2002 23:54:09 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 17974 for review
Message-ID:  <200209230654.g8N6s9x2061537@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17974

Change 17974 by peter@peter_overcee on 2002/09/22 23:53:51

	IFC @17973

Affected files ...

.. //depot/projects/hammer/contrib/bind/port/freebsd/include/port_after.h#2 integrate
.. //depot/projects/hammer/sys/alpha/include/endian.h#3 integrate
.. //depot/projects/hammer/sys/alpha/pci/tsunamireg.h#2 integrate
.. //depot/projects/hammer/sys/boot/ia64/skiload/main.c#2 integrate
.. //depot/projects/hammer/sys/cam/cam_xpt.c#3 integrate
.. //depot/projects/hammer/sys/cam/scsi/scsi_all.c#3 integrate
.. //depot/projects/hammer/sys/compat/linux/linux_socket.c#2 integrate
.. //depot/projects/hammer/sys/compat/linux/linux_sysctl.c#3 integrate
.. //depot/projects/hammer/sys/compat/svr4/svr4_stream.c#3 integrate
.. //depot/projects/hammer/sys/dev/ciss/cissio.h#2 integrate
.. //depot/projects/hammer/sys/dev/isp/isp.c#3 integrate
.. //depot/projects/hammer/sys/dev/isp/isp_freebsd.h#3 integrate
.. //depot/projects/hammer/sys/dev/isp/isp_inline.h#2 integrate
.. //depot/projects/hammer/sys/dev/isp/isp_pci.c#3 integrate
.. //depot/projects/hammer/sys/dev/isp/isp_sbus.c#2 integrate
.. //depot/projects/hammer/sys/dev/isp/ispmbox.h#3 integrate
.. //depot/projects/hammer/sys/dev/isp/ispvar.h#3 integrate
.. //depot/projects/hammer/sys/dev/mpt/mpt.c#2 integrate
.. //depot/projects/hammer/sys/dev/mpt/mpt_freebsd.c#2 integrate
.. //depot/projects/hammer/sys/dev/mpt/mpt_freebsd.h#2 integrate
.. //depot/projects/hammer/sys/dev/mpt/mpt_pci.c#2 integrate
.. //depot/projects/hammer/sys/dev/ray/if_raymib.h#2 integrate
.. //depot/projects/hammer/sys/dev/sbni/if_sbni.c#2 integrate
.. //depot/projects/hammer/sys/dev/usb/usb.h#2 integrate
.. //depot/projects/hammer/sys/i386/include/endian.h#3 integrate
.. //depot/projects/hammer/sys/i386/include/npx.h#3 integrate
.. //depot/projects/hammer/sys/i386/include/segments.h#3 integrate
.. //depot/projects/hammer/sys/i386/include/tss.h#2 integrate
.. //depot/projects/hammer/sys/i386/linux/linux_proto.h#2 integrate
.. //depot/projects/hammer/sys/i386/linux/linux_syscall.h#2 integrate
.. //depot/projects/hammer/sys/i386/linux/linux_sysent.c#2 integrate
.. //depot/projects/hammer/sys/i386/linux/syscalls.master#2 integrate
.. //depot/projects/hammer/sys/ia64/include/endian.h#3 integrate
.. //depot/projects/hammer/sys/ia64/include/reg.h#3 integrate
.. //depot/projects/hammer/sys/ia64/include/signal.h#3 integrate
.. //depot/projects/hammer/sys/kern/kern_alq.c#2 integrate
.. //depot/projects/hammer/sys/kern/kern_proc.c#4 integrate
.. //depot/projects/hammer/sys/kern/kern_switch.c#4 integrate
.. //depot/projects/hammer/sys/kern/kern_thread.c#4 integrate
.. //depot/projects/hammer/sys/kern/subr_trap.c#3 integrate
.. //depot/projects/hammer/sys/net/if_arc.h#2 integrate
.. //depot/projects/hammer/sys/net/if_gre.h#2 integrate
.. //depot/projects/hammer/sys/net/if_llc.h#2 integrate
.. //depot/projects/hammer/sys/net/if_spppsubr.c#3 integrate
.. //depot/projects/hammer/sys/net/iso88025.h#2 integrate
.. //depot/projects/hammer/sys/netinet/icmp6.h#2 integrate
.. //depot/projects/hammer/sys/netinet/ip6.h#2 integrate
.. //depot/projects/hammer/sys/netinet6/in6_cksum.c#2 integrate
.. //depot/projects/hammer/sys/powerpc/include/endian.h#3 integrate
.. //depot/projects/hammer/sys/sparc64/include/endian.h#3 integrate
.. //depot/projects/hammer/sys/sys/cdefs.h#3 integrate
.. //depot/projects/hammer/sys/sys/linker_set.h#3 integrate
.. //depot/projects/hammer/sys/sys/proc.h#4 integrate
.. //depot/projects/hammer/sys/tools/vnode_if.awk#3 integrate
.. //depot/projects/hammer/sys/x86_64/include/endian.h#3 integrate
.. //depot/projects/hammer/tools/KSE/ksetest/kse_threads_test.c#3 integrate
.. //depot/projects/hammer/tools/KSE/ksetest/simplelock.h#1 branch
.. //depot/projects/hammer/usr.bin/uname/uname.c#4 integrate

Differences ...

==== //depot/projects/hammer/contrib/bind/port/freebsd/include/port_after.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/bind/port/freebsd/include/port_after.h,v 1.13 2002/05/13 19:33:23 nectar Exp $ */
+/* $FreeBSD: src/contrib/bind/port/freebsd/include/port_after.h,v 1.14 2002/09/23 03:40:09 mike Exp $ */
 #ifndef	PORT_AFTER_H
 #define	PORT_AFTER_H
 #define USE_POSIX
@@ -7,7 +7,6 @@
 #define USE_WAITPID
 #define HAVE_GETRUSAGE
 #define HAVE_FCHMOD
-#define NEED_PSELECT
 #define HAVE_SA_LEN
 #define SETPWENT_VOID
 #define RLIMIT_TYPE rlim_t
@@ -27,6 +26,7 @@
 #define UDPSUM		"udpcksum"
 
 #include <sys/types.h>
+#include <sys/select.h>
 #include <sys/socket.h>
 #include <sys/param.h>
 #if (!defined(BSD)) || (BSD < 199306)

==== //depot/projects/hammer/sys/alpha/include/endian.h#3 (text+ko) ====

@@ -32,7 +32,7 @@
  *
  *	@(#)endian.h	8.1 (Berkeley) 6/10/93
  *	$NetBSD: endian.h,v 1.5 1997/10/09 15:42:19 bouyer Exp $
- * $FreeBSD: src/sys/alpha/include/endian.h,v 1.12 2002/08/21 16:19:58 mike Exp $
+ * $FreeBSD: src/sys/alpha/include/endian.h,v 1.13 2002/09/23 04:32:16 mike Exp $
  */
 
 #ifndef _MACHINE_ENDIAN_H_
@@ -112,11 +112,20 @@
 	return (__r);
 }
 
-#endif /* __GNUC__ */
-
 #define	__htonl(x)	__bswap32(x)
 #define	__htons(x)	__bswap16(x)
 #define	__ntohl(x)	__bswap32(x)
 #define	__ntohs(x)	__bswap16(x)
 
+#else /* !__GNUC__ */
+
+/*
+ * No optimizations are available for this compiler.  Fall back to
+ * non-optimized functions by defining the constant usually used to prevent
+ * redefinition.
+ */
+#define	_BYTEORDER_FUNC_DEFINED
+
+#endif /* __GNUC__ */
+
 #endif /* !_MACHINE_ENDIAN_H_ */

==== //depot/projects/hammer/sys/alpha/pci/tsunamireg.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/pci/tsunamireg.h,v 1.3 1999/08/28 00:39:03 peter Exp $ */
+/* $FreeBSD: src/sys/alpha/pci/tsunamireg.h,v 1.4 2002/09/23 05:55:10 peter Exp $ */
 
 /*
  * 21271 Chipset registers and constants.
@@ -10,7 +10,7 @@
 
 
 typedef struct {
-	volatile u_int64_t reg __attribute__((aligned(64)));
+	volatile u_int64_t reg __aligned(64);
 } tsunami_reg;
 					/* notes */
 typedef struct { 

==== //depot/projects/hammer/sys/boot/ia64/skiload/main.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$FreeBSD: src/sys/boot/ia64/skiload/main.c,v 1.1 2001/09/12 08:34:27 dfr Exp $";
+  "$FreeBSD: src/sys/boot/ia64/skiload/main.c,v 1.2 2002/09/23 05:55:10 peter Exp $";
 #endif /* not lint */
 
 #include <stand.h>
@@ -49,7 +49,7 @@
 void
 __start(void)
 {
-	static char stack[16384] __attribute__((aligned (16)));
+	static char stack[16384] __aligned(16);
 	static char malloc[512*1024];
 	int i;
 

==== //depot/projects/hammer/sys/cam/cam_xpt.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.127 2002/09/02 20:10:18 brooks Exp $
+ * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.128 2002/09/23 04:55:32 mjacob Exp $
  */
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -471,6 +471,14 @@
 	},
 	{
 		/*
+		 * These are the large storage arrays.
+		 * Submitted by:  William Carrel <william.carrel@infospace.com>
+		 */
+		{ T_DIRECT, SIP_MEDIA_FIXED, "HITACHI", "OPEN*", "*" },
+		CAM_QUIRK_HILUNS, 2, 1024
+	},
+	{
+		/*
 		 * This old revision of the TDC3600 is also SCSI-1, and
 		 * hangs upon serial number probing.
 		 */

==== //depot/projects/hammer/sys/cam/scsi/scsi_all.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.37 2002/09/02 20:10:19 brooks Exp $
+ * $FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.38 2002/09/23 04:56:35 mjacob Exp $
  */
 
 #include <sys/param.h>
@@ -72,7 +72,9 @@
 #endif
 /*
  * All devices need _some_ sort of bus settle delay, so we'll set it to
- * a minimum value of 100ms.
+ * a minimum value of 100ms. Note that this is pertinent only for SPI-
+ * not transport like Fibre Channel or iSCSI where 'delay' is completely
+ * meaningless.
  */
 #ifndef SCSI_MIN_DELAY
 #define SCSI_MIN_DELAY 100
@@ -80,7 +82,7 @@
 /*
  * Make sure the user isn't using seconds instead of milliseconds.
  */
-#if (SCSI_DELAY < SCSI_MIN_DELAY)
+#if (SCSI_DELAY < SCSI_MIN_DELAY && SCSI_DELAY != 0)
 #error "SCSI_DELAY is in milliseconds, not seconds!  Please use a larger value"
 #endif
 

==== //depot/projects/hammer/sys/compat/linux/linux_socket.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.32 2002/06/02 20:05:42 schweikh Exp $
+ * $FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.33 2002/09/23 06:17:51 mini Exp $
  */
 
 /* XXX we use functions that might not exist. */
@@ -503,7 +503,7 @@
 	bsd_args.s = linux_args.s;
 	bsd_args.name = (caddr_t)linux_args.addr;
 	bsd_args.anamelen = linux_args.namelen;
-	error = oaccept(td, &bsd_args);
+	error = accept(td, &bsd_args);
 	if (error)
 		return (error);
 
@@ -543,7 +543,7 @@
 	bsd_args.fdes = linux_args.s;
 	bsd_args.asa = (caddr_t) linux_args.addr;
 	bsd_args.alen = linux_args.namelen;
-	return (ogetsockname(td, &bsd_args));
+	return (getsockname(td, &bsd_args));
 }
 
 struct linux_getpeername_args {
@@ -556,7 +556,7 @@
 linux_getpeername(struct thread *td, struct linux_getpeername_args *args)
 {
 	struct linux_getpeername_args linux_args;
-	struct ogetpeername_args /* {
+	struct getpeername_args /* {
 		int fdes;
 		caddr_t asa;
 		int *alen;
@@ -569,7 +569,7 @@
 	bsd_args.fdes = linux_args.s;
 	bsd_args.asa = (caddr_t) linux_args.addr;
 	bsd_args.alen = linux_args.namelen;
-	return (ogetpeername(td, &bsd_args));
+	return (getpeername(td, &bsd_args));
 }
 
 struct linux_socketpair_args {
@@ -615,11 +615,13 @@
 linux_send(struct thread *td, struct linux_send_args *args)
 {
 	struct linux_send_args linux_args;
-	struct osend_args /* {
-		int s;
+	struct sendto_args /* {
+                int s;
 		caddr_t buf;
-		int len;
+		size_t len;
 		int flags;
+		caddr_t to;
+		int tolen;
 	} */ bsd_args;
 	int error;
 
@@ -630,7 +632,9 @@
 	bsd_args.buf = linux_args.msg;
 	bsd_args.len = linux_args.len;
 	bsd_args.flags = linux_args.flags;
-	return (osend(td, &bsd_args));
+	bsd_args.to = NULL;
+	bsd_args.tolen = 0;
+	return (sendto(td, &bsd_args));
 }
 
 struct linux_recv_args {
@@ -644,11 +648,13 @@
 linux_recv(struct thread *td, struct linux_recv_args *args)
 {
 	struct linux_recv_args linux_args;
-	struct orecv_args /* {
+	struct recvfrom_args /* {
 		int s;
 		caddr_t buf;
 		int len;
 		int flags;
+		caddr_t from;
+		int fromlen;
 	} */ bsd_args;
 	int error;
 
@@ -659,7 +665,9 @@
 	bsd_args.buf = linux_args.msg;
 	bsd_args.len = linux_args.len;
 	bsd_args.flags = linux_args.flags;
-	return (orecv(td, &bsd_args));
+	bsd_args.from = NULL;
+	bsd_args.fromlenaddr = NULL;
+	return (recvfrom(td, &bsd_args));
 }
 
 struct linux_sendto_args {
@@ -734,7 +742,7 @@
 	bsd_args.flags = linux_to_bsd_msg_flags(linux_args.flags);
 	bsd_args.from = linux_args.from;
 	bsd_args.fromlenaddr = linux_args.fromlen;
-	return (orecvfrom(td, &bsd_args));
+	return (recvfrom(td, &bsd_args));
 }
 
 struct linux_recvmsg_args {

==== //depot/projects/hammer/sys/compat/linux/linux_sysctl.c#3 (text+ko) ====

@@ -25,11 +25,15 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/compat/linux/linux_sysctl.c,v 1.4 2002/09/05 08:13:20 bde Exp $
+ * $FreeBSD: src/sys/compat/linux/linux_sysctl.c,v 1.5 2002/09/23 06:17:51 mini Exp $
  */
 
 #include <sys/param.h>
+#include <sys/lock.h>
 #include <sys/malloc.h>
+#include <sys/mutex.h>
+#include <sys/proc.h>
+#include <sys/sysctl.h>
 #include <sys/systm.h>
 
 #include <machine/../linux/linux.h>
@@ -117,3 +121,20 @@
 	free(mib, M_TEMP);
 	return (ENOTDIR);
 }
+
+int
+linux_sethostname(struct thread *td, struct linux_sethostname_args *uap)
+{
+	int name[2];
+	int error;
+
+	name[0] = CTL_KERN;
+	name[1] = KERN_HOSTNAME;
+	mtx_lock(&Giant);
+	if ((error = suser_cred(td->td_ucred, PRISON_ROOT)) == 0) {
+		error = userland_sysctl(td, name, 2, 0, 0, 0,
+		    uap->hostname, uap->len, 0);
+	}
+	mtx_unlock(&Giant);
+	return (error);
+}

==== //depot/projects/hammer/sys/compat/svr4/svr4_stream.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.31 2002/08/17 02:36:15 rwatson Exp $
+ * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.32 2002/09/23 06:17:53 mini Exp $
  */
 
 /*
@@ -2252,24 +2252,30 @@
 	struct thread *td;
 	struct svr4_sys_send_args *uap;
 {
-	struct osend_args osa;
+	struct sendto_args osa;
+
 	SCARG(&osa, s) = SCARG(uap, s);
 	SCARG(&osa, buf) = SCARG(uap, buf);
 	SCARG(&osa, len) = SCARG(uap, len);
 	SCARG(&osa, flags) = SCARG(uap, flags);
-	return osend(td, &osa);
+	SCARG(&osa, to) = NULL;
+	SCARG(&osa, tolen) = 0;
+	return sendto(td, &osa);
 }
 
 int svr4_sys_recv(td, uap)
 	struct thread *td;
 	struct svr4_sys_recv_args *uap;
 {
-	struct orecv_args ora;
+	struct recvfrom_args ora;
+
 	SCARG(&ora, s) = SCARG(uap, s);
 	SCARG(&ora, buf) = SCARG(uap, buf);
 	SCARG(&ora, len) = SCARG(uap, len);
 	SCARG(&ora, flags) = SCARG(uap, flags);
-	return orecv(td, &ora);
+	SCARG(&osa, from) = NULL;
+	SCARG(&osa, fromlen) = 0;
+	return recvfrom(td, &ora);
 }
 
 /* 

==== //depot/projects/hammer/sys/dev/ciss/cissio.h#2 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/ciss/cissio.h,v 1.1 2001/11/27 23:08:36 msmith Exp $
+ *	$FreeBSD: src/sys/dev/ciss/cissio.h,v 1.2 2002/09/23 06:35:32 alfred Exp $
  */
 
 /*
@@ -108,18 +108,18 @@
 	u_int8_t	Dev;
 	u_int8_t	Bus:6;
 	u_int8_t	Mode:2;
-    } PeripDev __attribute__ ((__packed__));
+    } PeripDev __packed;
     struct {
 	u_int8_t	DevLSB;
 	u_int8_t	DevMSB:6;
 	u_int8_t	Mode:2;
-    } LogDev __attribute__ ((__packed__));
+    } LogDev __packed;
     struct {
 	u_int8_t	Dev:5;
 	u_int8_t	Bus:3;
 	u_int8_t	Targ:6;
 	u_int8_t	Mode:2;
-    } LogUnit __attribute__ ((__packed__));
+    } LogUnit __packed;
 } SCSI3Addr_struct;
 
 typedef struct {
@@ -127,20 +127,20 @@
     u_int32_t		Bus:6;
     u_int32_t		Mode:2;
     SCSI3Addr_struct	Target[2];
-} PhysDevAddr_struct __attribute__ ((__packed__));
+} PhysDevAddr_struct __packed;
   
 typedef struct {
     u_int32_t		VolId:30;
     u_int32_t		Mode:2;
     u_int8_t		reserved[4];
-} LogDevAddr_struct __attribute__ ((__packed__));
+} LogDevAddr_struct __packed;
 
 typedef union {
     u_int8_t		LunAddrBytes[8];
     SCSI3Addr_struct	SCSI3Lun[4];
     PhysDevAddr_struct	PhysDev;
     LogDevAddr_struct	LogDev;
-} LUNAddr_struct __attribute__ ((__packed__));
+} LUNAddr_struct __packed;
 
 typedef struct {
     u_int8_t	CDBLen;
@@ -148,24 +148,24 @@
 	u_int8_t	Type:3;
 	u_int8_t	Attribute:3;
 	u_int8_t	Direction:2;
-    } Type __attribute__ ((__packed__));
+    } Type __packed;
     u_int16_t	Timeout;
     u_int8_t	CDB[16];
-} RequestBlock_struct __attribute__ ((__packed__));
+} RequestBlock_struct __packed;
 
 typedef union {
     struct {
 	u_int8_t	Reserved[3];
 	u_int8_t	Type;
 	u_int32_t	ErrorInfo;
-    } Common_Info __attribute__ ((__packed__));
+    } Common_Info __packed;
     struct {
 	u_int8_t	Reserved[2];
 	u_int8_t	offense_size;
 	u_int8_t	offense_num;
 	u_int32_t	offense_value;
-    } Invalid_Cmd __attribute__ ((__packed__));
-} MoreErrInfo_struct __attribute__ ((__packed__));
+    } Invalid_Cmd __packed;
+} MoreErrInfo_struct __packed;
 
 typedef struct {
     u_int8_t		ScsiStatus;
@@ -174,7 +174,7 @@
     u_int32_t		ResidualCnt;
     MoreErrInfo_struct	MoreErrInfo;
     u_int8_t		SenseInfo[SENSEINFOBYTES];
-} ErrorInfo_struct __attribute__ ((__packed__));
+} ErrorInfo_struct __packed;
 
 typedef struct {
     LUNAddr_struct	LUN_info;	/* 8 */
@@ -182,7 +182,7 @@
     ErrorInfo_struct	error_info;	/* 48 */
     u_int16_t		buf_size;	/* 2 */
     u_int8_t		*buf;		/* 4 */
-} IOCTL_Command_struct __attribute__ ((__packed__));
+} IOCTL_Command_struct __packed;
 
 /*
  * Note that we'd normally pass the struct in directly, but

==== //depot/projects/hammer/sys/dev/isp/isp.c#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/isp.c,v 1.98 2002/09/07 16:12:52 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/isp.c,v 1.99 2002/09/23 04:59:42 mjacob Exp $ */
 /*
  * Machine and OS Independent (well, as best as possible)
  * code for the Qlogic ISP SCSI adapters.
@@ -950,28 +950,55 @@
 	 * Now enable request/response queues
 	 */
 
-	mbs.param[0] = MBOX_INIT_RES_QUEUE;
-	mbs.param[1] = RESULT_QUEUE_LEN(isp);
-	mbs.param[2] = DMA_WD1(isp->isp_result_dma);
-	mbs.param[3] = DMA_WD0(isp->isp_result_dma);
-	mbs.param[4] = 0;
-	mbs.param[5] = 0;
-	isp_mboxcmd(isp, &mbs, MBLOGALL);
-	if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
-		return;
-	}
-	isp->isp_residx = mbs.param[5];
+	if (IS_ULTRA2(isp) || IS_1240(isp)) {
+		mbs.param[0] = MBOX_INIT_RES_QUEUE_A64;
+		mbs.param[1] = RESULT_QUEUE_LEN(isp);
+		mbs.param[2] = DMA_WD1(isp->isp_result_dma);
+		mbs.param[3] = DMA_WD0(isp->isp_result_dma);
+		mbs.param[4] = 0;
+		mbs.param[6] = DMA_WD3(isp->isp_result_dma);
+		mbs.param[7] = DMA_WD2(isp->isp_result_dma);
+		isp_mboxcmd(isp, &mbs, MBLOGALL);
+		if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
+			return;
+		}
+		isp->isp_residx = mbs.param[5];
+
+		mbs.param[0] = MBOX_INIT_REQ_QUEUE_A64;
+		mbs.param[1] = RQUEST_QUEUE_LEN(isp);
+		mbs.param[2] = DMA_WD1(isp->isp_rquest_dma);
+		mbs.param[3] = DMA_WD0(isp->isp_rquest_dma);
+		mbs.param[5] = 0;
+		mbs.param[6] = DMA_WD3(isp->isp_result_dma);
+		mbs.param[7] = DMA_WD2(isp->isp_result_dma);
+		isp_mboxcmd(isp, &mbs, MBLOGALL);
+		if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
+			return;
+		}
+		isp->isp_reqidx = isp->isp_reqodx = mbs.param[4];
+	} else {
+		mbs.param[0] = MBOX_INIT_RES_QUEUE;
+		mbs.param[1] = RESULT_QUEUE_LEN(isp);
+		mbs.param[2] = DMA_WD1(isp->isp_result_dma);
+		mbs.param[3] = DMA_WD0(isp->isp_result_dma);
+		mbs.param[4] = 0;
+		isp_mboxcmd(isp, &mbs, MBLOGALL);
+		if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
+			return;
+		}
+		isp->isp_residx = mbs.param[5];
 
-	mbs.param[0] = MBOX_INIT_REQ_QUEUE;
-	mbs.param[1] = RQUEST_QUEUE_LEN(isp);
-	mbs.param[2] = DMA_WD1(isp->isp_rquest_dma);
-	mbs.param[3] = DMA_WD0(isp->isp_rquest_dma);
-	mbs.param[4] = 0;
-	isp_mboxcmd(isp, &mbs, MBLOGALL);
-	if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
-		return;
+		mbs.param[0] = MBOX_INIT_REQ_QUEUE;
+		mbs.param[1] = RQUEST_QUEUE_LEN(isp);
+		mbs.param[2] = DMA_WD1(isp->isp_rquest_dma);
+		mbs.param[3] = DMA_WD0(isp->isp_rquest_dma);
+		mbs.param[5] = 0;
+		isp_mboxcmd(isp, &mbs, MBLOGALL);
+		if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
+			return;
+		}
+		isp->isp_reqidx = isp->isp_reqodx = mbs.param[4];
 	}
-	isp->isp_reqidx = isp->isp_reqodx = mbs.param[4];
 
 	/*
 	 * Turn on Fast Posting, LVD transitions
@@ -4825,8 +4852,8 @@
 	ISPOPMAP(0x00, 0x00),	/* 0x4f: */
 	ISPOPMAP(0xdf, 0xdf),	/* 0x50: LOAD RAM A64 */
 	ISPOPMAP(0xdf, 0xdf),	/* 0x51: DUMP RAM A64 */
-	ISPOPMAP(0xdf, 0xdf),	/* 0x52: INITIALIZE REQUEST QUEUE A64 */
-	ISPOPMAP(0xff, 0xff),	/* 0x53: INITIALIZE RESPONSE QUEUE A64 */
+	ISPOPMAP(0xdf, 0xff),	/* 0x52: INITIALIZE REQUEST QUEUE A64 */
+	ISPOPMAP(0xef, 0xff),	/* 0x53: INITIALIZE RESPONSE QUEUE A64 */
 	ISPOPMAP(0xcf, 0x01),	/* 0x54: EXECUTE IOCB A64 */
 	ISPOPMAP(0x07, 0x01),	/* 0x55: ENABLE TARGET MODE */
 	ISPOPMAP(0x03, 0x0f),	/* 0x56: GET TARGET STATUS */

==== //depot/projects/hammer/sys/dev/isp/isp_freebsd.h#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.70 2002/09/06 18:32:16 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.71 2002/09/23 05:00:14 mjacob Exp $ */
 /*
  * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions
  * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 by Matthew Jacob
@@ -61,7 +61,10 @@
 #include "opt_ddb.h"
 #include "opt_isp.h"
 
-#define	ISP_DMA_ADDR_T	bus_addr_t
+/*
+ * Not quite yet
+ */
+/* #define	ISP_DAC_SUPPORTED	1 */
 
 /*
  * Efficiency- get rid of SBus code && tests unless we need them.

==== //depot/projects/hammer/sys/dev/isp/isp_inline.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/isp_inline.h,v 1.27 2002/07/11 03:25:04 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/isp_inline.h,v 1.28 2002/09/23 05:00:37 mjacob Exp $ */
 /*
  * Qlogic Host Adapter Inline Functions
  *
@@ -476,7 +476,7 @@
 		ISP_IOXPUT_8(isp, tqsrc->req_cdb[i], &tqdst->req_cdb[i]);
 	}
 	ISP_IOXPUT_32(isp, tqsrc->req_totalcnt, &tqdst->req_totalcnt);
-	for (i = 0; i < ISP_RQDSEG_T2; i++) {
+	for (i = 0; i < ISP_RQDSEG_T3; i++) {
 		ISP_IOXPUT_32(isp, tqsrc->req_dataseg[i].ds_base,
 		    &tqdst->req_dataseg[i].ds_base);
 		ISP_IOXPUT_32(isp, tqsrc->req_dataseg[i].ds_basehi,

==== //depot/projects/hammer/sys/dev/isp/isp_pci.c#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.87 2002/08/17 17:21:54 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.88 2002/09/23 05:02:53 mjacob Exp $ */
 /*
  * PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
  * FreeBSD Version.
@@ -1057,7 +1057,7 @@
 	caddr_t base;
 	u_int32_t len;
 	int i, error, ns;
-	bus_size_t bl;
+	bus_size_t alim, slim;
 	struct imush im;
 
 	/*
@@ -1067,16 +1067,20 @@
 		return (0);
 	}
 
+#ifdef	ISP_DAC_SUPPORTED
+	alim = BUS_SPACE_UNRESTRICTED;
+#else
+	alim = BUS_SPACE_MAXADDR_32BIT;
+#endif
 	if (IS_ULTRA2(isp) || IS_FC(isp) || IS_1240(isp)) {
-		bl = BUS_SPACE_UNRESTRICTED;
+		slim = BUS_SPACE_MAXADDR_32BIT;
 	} else {
-		bl = BUS_SPACE_MAXADDR_24BIT;
+		slim = BUS_SPACE_MAXADDR_24BIT;
 	}
 
 	ISP_UNLOCK(isp);
-	if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR,
-	    BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE,
-	    ISP_NSEGS, bl, 0, &pcs->dmat)) {
+	if (bus_dma_tag_create(NULL, 1, slim+1, alim, alim,
+	    NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &pcs->dmat)) {
 		isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
 		ISP_LOCK(isp);
 		return(1);
@@ -1109,8 +1113,8 @@
 	}
 
 	ns = (len / PAGE_SIZE) + 1;
-	if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, 0, BUS_SPACE_MAXADDR,
-	    BUS_SPACE_MAXADDR, NULL, NULL, len, ns, bl, 0, &isp->isp_cdmat)) {
+	if (bus_dma_tag_create(pcs->dmat, QENTRY_LEN, slim+1, alim, alim,
+	    NULL, NULL, len, ns, slim, 0, &isp->isp_cdmat)) {
 		isp_prt(isp, ISP_LOGERR,
 		    "cannot create a dma tag for control spaces");
 		free(pcs->dmaps, M_DEVBUF);

==== //depot/projects/hammer/sys/dev/isp/isp_sbus.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.4 2002/07/25 20:49:30 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.5 2002/09/23 05:03:34 mjacob Exp $ */
 /*
  * PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
  * FreeBSD Version.
@@ -477,7 +477,6 @@
 	caddr_t base;
 	u_int32_t len;
 	int i, error, ns;
-	bus_size_t bl;
 	struct imush im;
 
 	/*
@@ -488,17 +487,16 @@
 	}
 
 	ISP_UNLOCK(isp);
-	bl = BUS_SPACE_MAXADDR_24BIT;
 
-	if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR,
-	    BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE,
-	    ISP_NSEGS, bl, 0, &sbs->dmat)) {
+	if (bus_dma_tag_create(NULL, 1, BUS_SPACE_MAXADDR_24BIT-1,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR_32BIT,
+	    NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, ISP_NSEGS,
+	    BUS_SPACE_MAXADDR_24BIT, 0, &sbs->dmat)) {
 		isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
 		ISP_LOCK(isp);
 		return(1);
 	}
 
-
 	len = sizeof (XS_T **) * isp->isp_maxcmds;
 	isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
 	if (isp->isp_xflist == NULL) {
@@ -522,8 +520,9 @@
 	len += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp));
 
 	ns = (len / PAGE_SIZE) + 1;
-	if (bus_dma_tag_create(sbs->dmat, QENTRY_LEN, 0, BUS_SPACE_MAXADDR,
-	    BUS_SPACE_MAXADDR, NULL, NULL, len, ns, bl, 0, &isp->isp_cdmat)) {
+	if (bus_dma_tag_create(sbs->dmat, QENTRY_LEN, BUS_SPACE_MAXADDR_24BIT-1,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR_32BIT, NULL, NULL,
+	    len, ns, BUS_SPACE_MAXADDR_24BIT, 0, &isp->isp_cdmat)) {
 		isp_prt(isp, ISP_LOGERR,
 		    "cannot create a dma tag for control spaces");
 		free(sbs->dmaps, M_DEVBUF);

==== //depot/projects/hammer/sys/dev/isp/ispmbox.h#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.43 2002/08/17 17:19:29 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.44 2002/09/23 05:04:16 mjacob Exp $ */
 /*
  * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters.
  *
@@ -109,6 +109,9 @@
 #define		FW_FEATURE_RIO_32BIT	0x4
 #define		FW_FEATURE_RIO_16BIT	0x8
 
+#define	MBOX_INIT_REQ_QUEUE_A64		0x0052
+#define	MBOX_INIT_RES_QUEUE_A64		0x0053
+
 #define	MBOX_ENABLE_TARGET_MODE		0x0055
 #define		ENABLE_TARGET_FLAG	0x8000
 #define		ENABLE_TQING_FLAG	0x0004
@@ -338,6 +341,9 @@
 	ispds_t		req_dataseg[ISP_RQDSEG];
 } ispreq_t;
 
+#define	ispreq64_t	ispreqt3_t	/* same as.... */
+#define	ISP_RQDSEG_A64	2
+
 /*
  * A request packet can also be a marker packet.
  */

==== //depot/projects/hammer/sys/dev/isp/ispvar.h#3 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/ispvar.h,v 1.60 2002/09/06 18:32:16 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/ispvar.h,v 1.61 2002/09/23 05:09:23 mjacob Exp $ */
 /*
  * Soft Definitions for for Qlogic ISP SCSI adapters.
  *
@@ -89,8 +89,10 @@
 /*
  * 'Types'
  */
-#ifndef	ISP_DMA_ADDR_T
-#define	ISP_DMA_ADDR_T	u_int32_t
+#ifdef	ISP_DAC_SUPPORTED
+typedef	u_int64_t	isp_dma_addr_t;
+#else
+typedef	u_int32_t	isp_dma_addr_t;
 #endif
 
 /*
@@ -307,7 +309,7 @@
 	 * Scratch DMA mapped in area to fetch Port Database stuff, etc.
 	 */
 	caddr_t			isp_scratch;
-	ISP_DMA_ADDR_T		isp_scdma;
+	isp_dma_addr_t		isp_scdma;
 #ifdef	ISP_FW_CRASH_DUMP
 	u_int16_t		*isp_dump_data;
 #endif
@@ -429,8 +431,8 @@
 	 */
 	caddr_t			isp_rquest;
 	caddr_t			isp_result;
-	ISP_DMA_ADDR_T		isp_rquest_dma;
-	ISP_DMA_ADDR_T		isp_result_dma;
+	isp_dma_addr_t		isp_rquest_dma;
+	isp_dma_addr_t		isp_result_dma;
 } ispsoftc_t;
 
 #define	SDPARAM(isp)	((sdparam *) (isp)->isp_param)
@@ -566,8 +568,13 @@
 /*
  * DMA cookie macros
  */
+#ifdef	ISP_DAC_SUPPORTRED
+#define	DMA_WD3(x)	(((x) >> 48) & 0xffff)
+#define	DMA_WD2(x)	(((x) >> 32) & 0xffff)
+#else
 #define	DMA_WD3(x)	0
 #define	DMA_WD2(x)	0
+#endif
 #define	DMA_WD1(x)	(((x) >> 16) & 0xffff)
 #define	DMA_WD0(x)	(((x) & 0xffff))
 
@@ -703,7 +710,7 @@
  * we had better let the OS determine login policy.
  *
  * ISPASYNC_PROMENADE has an argument that is a pointer to an integer which
- * is an index into the portdb in the softc ('target'). Whether that entrie's
+ * is an index into the portdb in the softc ('target'). Whether that entry's
  * valid tag is set or not says whether something has arrived or departed.
  * The name refers to a favorite pastime of many city dwellers- watching
  * people come and go, talking of Michaelangelo, and so on..
@@ -772,10 +779,10 @@
  *
  *	INLINE		-	platform specific define for 'inline' functions
  *
- *	ISP_DMA_ADDR_T	-	platform specific dma address coookie- basically
- *				the largest integer that can hold the 32 or
- *				64 bit value appropriate for the QLogic's DMA
- *				addressing. Defaults to u_int32_t.
+ *	ISP_DAC_SUPPORTED -	Is DAC (Dual Address Cycle) is supported?
+ *				Basically means whether or not DMA for PCI
+ *				PCI cards (Ultra2 or better or FC) works
+ *				above 4GB.
  *
  *	ISP2100_SCRLEN	-	length for the Fibre Channel scratch DMA area
  *

==== //depot/projects/hammer/sys/dev/mpt/mpt.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/mpt/mpt.c,v 1.4 2002/09/01 23:07:09 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/mpt/mpt.c,v 1.5 2002/09/23 05:14:02 mjacob Exp $ */
 /*
  * Generic routines for LSI '909 FC  adapters.
  * FreeBSD Version.
@@ -231,6 +231,7 @@
 		panic("mpt_free_request bad req ptr\n");
 		return;
 	}
+	req->sequence = 0;
 	req->ccb = NULL;
 	req->debug = REQ_FREE;
 	SLIST_INSERT_HEAD(&mpt->request_free_list, req, link);
@@ -559,7 +560,7 @@
 	return (0);
 }
 
-#define	CFG_DATA_OFF	40
+#define	CFG_DATA_OFF	128
 
 int
 mpt_read_cfg_page(mpt_softc_t *mpt, int PageAddress, fCONFIG_PAGE_HEADER *hdr)
@@ -575,7 +576,7 @@
 
 	cfgp = req->req_vbuf;
  	amt = (cfgp->Header.PageLength * sizeof (uint32_t));
-	bzero(cfgp, sizeof *cfgp);
+	bzero(cfgp, MPT_REQUEST_AREA);
 	cfgp->Action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
 	cfgp->Function = MPI_FUNCTION_CONFIG;
 	cfgp->Header = *hdr;

==== //depot/projects/hammer/sys/dev/mpt/mpt_freebsd.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/mpt/mpt_freebsd.c,v 1.4 2002/09/01 23:07:09 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/mpt/mpt_freebsd.c,v 1.5 2002/09/23 05:25:59 mjacob Exp $ */
 /*
  * FreeBSD/CAM specific routines for LSI '909 FC  adapters.
  * FreeBSD Version.
@@ -34,6 +34,7 @@
 
 static void mpt_poll(struct cam_sim *);
 static timeout_t mpttimeout;
+static timeout_t mpttimeout2;
 static void mpt_action(struct cam_sim *, union ccb *);
 static int mpt_setwidth(mpt_softc_t *, int, int);
 static int mpt_setsync(mpt_softc_t *, int, int, int);
@@ -119,13 +120,22 @@
 {
 	request_t *req;
 	union ccb *ccb = arg;
+	u_int32_t oseq;
 	mpt_softc_t *mpt;
 
 	mpt = ccb->ccb_h.ccb_mpt_ptr;
 	MPT_LOCK(mpt);
-
 	req = ccb->ccb_h.ccb_req_ptr;
+	oseq = req->sequence;
 	mpt->timeouts++;
+	if (mpt_intr(mpt)) {
+		if (req->sequence != oseq) {
+			device_printf(mpt->dev, "bullet missed in timeout\n");
+			MPT_UNLOCK(mpt);
+			return;
+		}
+		device_printf(mpt->dev, "bullet U-turned in timeout: got us\n");
+	}
 	device_printf(mpt->dev,
 	    "time out on request index = 0x%02x sequence = 0x%08x\n",
 	    req->index, req->sequence);
@@ -142,6 +152,8 @@
 	mpt_print_scsi_io_request((MSG_SCSI_IO_REQUEST *)req->req_vbuf);
 	req->debug = REQ_TIMEOUT;
 	req->ccb = NULL;
+	req->link.sle_next = (void *) mpt;
+	(void) timeout(mpttimeout2, (caddr_t)req, hz / 10);
 	ccb->ccb_h.status = CAM_CMD_TIMEOUT;
 	ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
 	MPTLOCK_2_CAMLOCK(mpt);
@@ -150,6 +162,18 @@
 	MPT_UNLOCK(mpt);
 }
 
+static void
+mpttimeout2(void *arg)
+{
+	request_t *req = arg;
+	if (req->debug == REQ_TIMEOUT) {
+		mpt_softc_t *mpt = (mpt_softc_t *) req->link.sle_next;
+		MPT_LOCK(mpt);
+		mpt_free_request(mpt, req);
+		MPT_UNLOCK(mpt);
+	}
+}
+
 /*
  * Callback routine from "bus_dmamap_load" or in simple case called directly.
  *
@@ -341,6 +365,7 @@
 	}
 
 	ccb->ccb_h.status |= CAM_SIM_QUEUED;
+	MPTLOCK_2_CAMLOCK(mpt);
 	if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) {
 		ccb->ccb_h.timeout_ch =
 			timeout(mpttimeout, (caddr_t)ccb,
@@ -350,7 +375,6 @@
 	}
 	if (mpt->verbose > 1)
 		mpt_print_scsi_io_request(mpt_req);
-	CAMLOCK_2_MPTLOCK(mpt);
 	mpt_send_cmd(mpt, req);
 	MPTLOCK_2_CAMLOCK(mpt);
 }
@@ -361,7 +385,7 @@

>>> TRUNCATED FOR MAIL (1000 lines) <<<

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209230654.g8N6s9x2061537>