PERFORCE change 119896 for review

John Baldwin jhb at FreeBSD.org
Tue May 15 22:09:17 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=119896

Change 119896 by jhb at jhb_mutex on 2007/05/15 22:08:42

	IFC @119893

Affected files ...

.. //depot/projects/smpng/sys/amd64/conf/GENERIC#58 integrate
.. //depot/projects/smpng/sys/amd64/conf/NOTES#38 integrate
.. //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#24 integrate
.. //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#26 integrate
.. //depot/projects/smpng/sys/boot/common/loader.8#45 integrate
.. //depot/projects/smpng/sys/cam/cam_periph.c#25 integrate
.. //depot/projects/smpng/sys/cam/cam_xpt.c#45 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_cd.c#32 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_ch.c#16 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_da.c#76 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_sa.c#28 integrate
.. //depot/projects/smpng/sys/compat/ia32/ia32_sysvec.c#17 integrate
.. //depot/projects/smpng/sys/conf/Makefile.amd64#15 integrate
.. //depot/projects/smpng/sys/conf/Makefile.arm#25 integrate
.. //depot/projects/smpng/sys/conf/Makefile.i386#27 integrate
.. //depot/projects/smpng/sys/conf/Makefile.ia64#33 integrate
.. //depot/projects/smpng/sys/conf/Makefile.pc98#26 integrate
.. //depot/projects/smpng/sys/conf/Makefile.powerpc#34 integrate
.. //depot/projects/smpng/sys/conf/Makefile.sparc64#29 integrate
.. //depot/projects/smpng/sys/conf/Makefile.sun4v#2 integrate
.. //depot/projects/smpng/sys/conf/NOTES#143 integrate
.. //depot/projects/smpng/sys/conf/files#207 integrate
.. //depot/projects/smpng/sys/conf/options#143 integrate
.. //depot/projects/smpng/sys/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c#4 integrate
.. //depot/projects/smpng/sys/crypto/camellia/camellia-api.c#1 branch
.. //depot/projects/smpng/sys/crypto/camellia/camellia.c#1 branch
.. //depot/projects/smpng/sys/crypto/camellia/camellia.h#1 branch
.. //depot/projects/smpng/sys/dev/acpica/acpi.c#102 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi_hpet.c#6 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpivar.h#66 integrate
.. //depot/projects/smpng/sys/dev/ciss/ciss.c#53 integrate
.. //depot/projects/smpng/sys/dev/em/if_em.c#82 integrate
.. //depot/projects/smpng/sys/dev/firewire/sbp_targ.c#11 integrate
.. //depot/projects/smpng/sys/dev/hptiop/hptiop.c#1 branch
.. //depot/projects/smpng/sys/dev/hptiop/hptiop.h#1 branch
.. //depot/projects/smpng/sys/dev/isp/isp_freebsd.c#57 integrate
.. //depot/projects/smpng/sys/dev/isp/isp_pci.c#56 integrate
.. //depot/projects/smpng/sys/dev/isp/isp_sbus.c#27 integrate
.. //depot/projects/smpng/sys/dev/mfi/mfi.c#17 integrate
.. //depot/projects/smpng/sys/dev/mfi/mfi_disk.c#6 integrate
.. //depot/projects/smpng/sys/dev/mfi/mfi_ioctl.h#5 integrate
.. //depot/projects/smpng/sys/dev/mfi/mfi_pci.c#6 integrate
.. //depot/projects/smpng/sys/dev/mfi/mfivar.h#6 integrate
.. //depot/projects/smpng/sys/dev/mmc/mmc.c#2 integrate
.. //depot/projects/smpng/sys/dev/mmc/mmcsd.c#2 integrate
.. //depot/projects/smpng/sys/dev/mmc/mmcvar.h#2 integrate
.. //depot/projects/smpng/sys/dev/sk/if_sk.c#13 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/hda/hdac.c#14 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_externs.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_fwif.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_fwimg.c#3 delete
.. //depot/projects/smpng/sys/dev/twa/tw_cl_init.c#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_intr.c#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_io.c#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_ioctl.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_misc.c#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_cl_share.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_cam.c#10 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_externs.h#2 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_freebsd.c#7 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_includes.h#5 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_inline.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_ioctl.h#3 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_share.h#6 integrate
.. //depot/projects/smpng/sys/dev/twa/tw_osl_types.h#2 integrate
.. //depot/projects/smpng/sys/dev/usb/if_axe.c#31 integrate
.. //depot/projects/smpng/sys/dev/usb/if_cue.c#33 integrate
.. //depot/projects/smpng/sys/dev/usb/if_cuereg.h#9 integrate
.. //depot/projects/smpng/sys/dev/usb/if_kue.c#30 integrate
.. //depot/projects/smpng/sys/dev/usb/if_kuereg.h#10 integrate
.. //depot/projects/smpng/sys/dev/usb/if_rue.c#21 integrate
.. //depot/projects/smpng/sys/dev/usb/if_ruereg.h#6 integrate
.. //depot/projects/smpng/sys/dev/usb/if_udav.c#17 integrate
.. //depot/projects/smpng/sys/dev/usb/if_ural.c#25 integrate
.. //depot/projects/smpng/sys/dev/usb/if_uralvar.h#7 integrate
.. //depot/projects/smpng/sys/dev/usb/uhid.c#30 integrate
.. //depot/projects/smpng/sys/dev/usb/ukbd.c#24 integrate
.. //depot/projects/smpng/sys/dev/usb/ums.c#26 integrate
.. //depot/projects/smpng/sys/dev/usb/usb.c#36 integrate
.. //depot/projects/smpng/sys/dev/usb/usb_mem.c#9 integrate
.. //depot/projects/smpng/sys/geom/part/g_part.c#4 integrate
.. //depot/projects/smpng/sys/i386/Makefile#4 integrate
.. //depot/projects/smpng/sys/i386/conf/GENERIC#89 integrate
.. //depot/projects/smpng/sys/i386/conf/NOTES#127 integrate
.. //depot/projects/smpng/sys/i386/linux/linux_machdep.c#46 integrate
.. //depot/projects/smpng/sys/kern/Make.tags.inc#7 integrate
.. //depot/projects/smpng/sys/kern/imgact_elf.c#56 integrate
.. //depot/projects/smpng/sys/kern/kern_exec.c#105 integrate
.. //depot/projects/smpng/sys/kern/kern_exit.c#123 integrate
.. //depot/projects/smpng/sys/kern/kern_mib.c#30 integrate
.. //depot/projects/smpng/sys/kern/kern_resource.c#72 integrate
.. //depot/projects/smpng/sys/kern/kern_timeout.c#32 integrate
.. //depot/projects/smpng/sys/kern/uipc_usrreq.c#78 integrate
.. //depot/projects/smpng/sys/modules/Makefile#141 integrate
.. //depot/projects/smpng/sys/modules/crypto/Makefile#6 integrate
.. //depot/projects/smpng/sys/modules/hptiop/Makefile#1 branch
.. //depot/projects/smpng/sys/modules/netgraph/Makefile#26 integrate
.. //depot/projects/smpng/sys/modules/netgraph/car/Makefile#1 branch
.. //depot/projects/smpng/sys/modules/twa/Makefile#6 integrate
.. //depot/projects/smpng/sys/net/ethernet.h#13 integrate
.. //depot/projects/smpng/sys/net/ieee8023ad_lacp.c#6 integrate
.. //depot/projects/smpng/sys/net/ieee8023ad_lacp.h#4 integrate
.. //depot/projects/smpng/sys/net/if_lagg.c#5 integrate
.. //depot/projects/smpng/sys/net/if_lagg.h#4 integrate
.. //depot/projects/smpng/sys/net/pfkeyv2.h#8 integrate
.. //depot/projects/smpng/sys/netatalk/ddp_usrreq.c#30 integrate
.. //depot/projects/smpng/sys/netgraph/ng_car.c#1 branch
.. //depot/projects/smpng/sys/netgraph/ng_car.h#1 branch
.. //depot/projects/smpng/sys/netgraph/ng_mppc.c#14 integrate
.. //depot/projects/smpng/sys/netgraph/ng_socket.c#43 integrate
.. //depot/projects/smpng/sys/netinet/if_ether.c#55 integrate
.. //depot/projects/smpng/sys/netinet/in.c#38 integrate
.. //depot/projects/smpng/sys/netinet/in_cksum.c#4 integrate
.. //depot/projects/smpng/sys/netinet/in_gif.c#20 integrate
.. //depot/projects/smpng/sys/netinet/in_pcb.c#75 integrate
.. //depot/projects/smpng/sys/netinet/in_pcb.h#47 integrate
.. //depot/projects/smpng/sys/netinet/in_rmx.c#14 integrate
.. //depot/projects/smpng/sys/netinet/ip.h#13 integrate
.. //depot/projects/smpng/sys/netinet/ip_divert.c#54 integrate
.. //depot/projects/smpng/sys/netinet/ip_dummynet.c#46 integrate
.. //depot/projects/smpng/sys/netinet/ip_ecn.c#5 integrate
.. //depot/projects/smpng/sys/netinet/ip_encap.c#16 integrate
.. //depot/projects/smpng/sys/netinet/ip_fw2.c#87 integrate
.. //depot/projects/smpng/sys/netinet/ip_icmp.c#41 integrate
.. //depot/projects/smpng/sys/netinet/ip_id.c#7 integrate
.. //depot/projects/smpng/sys/netinet/ip_input.c#84 integrate
.. //depot/projects/smpng/sys/netinet/ip_ipsec.c#4 integrate
.. //depot/projects/smpng/sys/netinet/ip_mroute.c#57 integrate
.. //depot/projects/smpng/sys/netinet/ip_options.c#3 integrate
.. //depot/projects/smpng/sys/netinet/ip_options.h#2 integrate
.. //depot/projects/smpng/sys/netinet/ip_output.c#92 integrate
.. //depot/projects/smpng/sys/netinet/raw_ip.c#66 integrate
.. //depot/projects/smpng/sys/netinet/sctp_asconf.c#9 integrate
.. //depot/projects/smpng/sys/netinet/sctp_auth.c#9 integrate
.. //depot/projects/smpng/sys/netinet/sctp_indata.c#13 integrate
.. //depot/projects/smpng/sys/netinet/sctp_input.c#13 integrate
.. //depot/projects/smpng/sys/netinet/sctp_os_bsd.h#11 integrate
.. //depot/projects/smpng/sys/netinet/sctp_output.c#13 integrate
.. //depot/projects/smpng/sys/netinet/sctp_pcb.c#13 integrate
.. //depot/projects/smpng/sys/netinet/sctp_pcb.h#11 integrate
.. //depot/projects/smpng/sys/netinet/sctp_peeloff.c#9 integrate
.. //depot/projects/smpng/sys/netinet/sctp_timer.c#10 integrate
.. //depot/projects/smpng/sys/netinet/sctp_usrreq.c#14 integrate
.. //depot/projects/smpng/sys/netinet/sctputil.c#15 integrate
.. //depot/projects/smpng/sys/netinet/sctputil.h#10 integrate
.. //depot/projects/smpng/sys/netinet/tcp_fsm.h#6 integrate
.. //depot/projects/smpng/sys/netinet/tcp_input.c#106 integrate
.. //depot/projects/smpng/sys/netinet/tcp_output.c#50 integrate
.. //depot/projects/smpng/sys/netinet/tcp_reass.c#1 branch
.. //depot/projects/smpng/sys/netinet/tcp_sack.c#22 integrate
.. //depot/projects/smpng/sys/netinet/tcp_subr.c#94 integrate
.. //depot/projects/smpng/sys/netinet/tcp_timer.c#37 integrate
.. //depot/projects/smpng/sys/netinet/tcp_timewait.c#1 branch
.. //depot/projects/smpng/sys/netinet/tcp_usrreq.c#63 integrate
.. //depot/projects/smpng/sys/netinet/tcp_var.h#52 integrate
.. //depot/projects/smpng/sys/netinet/udp_usrreq.c#78 integrate
.. //depot/projects/smpng/sys/netinet6/esp_camellia.c#1 branch
.. //depot/projects/smpng/sys/netinet6/esp_camellia.h#1 branch
.. //depot/projects/smpng/sys/netinet6/esp_core.c#13 integrate
.. //depot/projects/smpng/sys/netinet6/in6_pcb.c#49 integrate
.. //depot/projects/smpng/sys/netinet6/in6_pcb.h#14 integrate
.. //depot/projects/smpng/sys/netinet6/ip6_input.c#48 integrate
.. //depot/projects/smpng/sys/netinet6/raw_ip6.c#44 integrate
.. //depot/projects/smpng/sys/netinet6/sctp6_usrreq.c#12 integrate
.. //depot/projects/smpng/sys/netipsec/xform_esp.c#11 integrate
.. //depot/projects/smpng/sys/netipx/ipx.c#13 integrate
.. //depot/projects/smpng/sys/netipx/ipx.h#9 integrate
.. //depot/projects/smpng/sys/netipx/ipx_cksum.c#7 integrate
.. //depot/projects/smpng/sys/netipx/ipx_if.h#7 integrate
.. //depot/projects/smpng/sys/netipx/ipx_input.c#19 integrate
.. //depot/projects/smpng/sys/netipx/ipx_outputfl.c#8 integrate
.. //depot/projects/smpng/sys/netipx/ipx_pcb.c#21 integrate
.. //depot/projects/smpng/sys/netipx/ipx_pcb.h#11 integrate
.. //depot/projects/smpng/sys/netipx/ipx_usrreq.c#27 integrate
.. //depot/projects/smpng/sys/netipx/ipx_var.h#10 integrate
.. //depot/projects/smpng/sys/netipx/spx_debug.c#5 integrate
.. //depot/projects/smpng/sys/netipx/spx_debug.h#6 integrate
.. //depot/projects/smpng/sys/opencrypto/cryptodev.c#23 integrate
.. //depot/projects/smpng/sys/opencrypto/cryptodev.h#11 integrate
.. //depot/projects/smpng/sys/opencrypto/cryptosoft.c#13 integrate
.. //depot/projects/smpng/sys/opencrypto/xform.c#7 integrate
.. //depot/projects/smpng/sys/opencrypto/xform.h#4 integrate
.. //depot/projects/smpng/sys/pc98/conf/GENERIC#70 integrate
.. //depot/projects/smpng/sys/pci/if_tl.c#36 integrate
.. //depot/projects/smpng/sys/sparc64/include/profile.h#7 integrate
.. //depot/projects/smpng/sys/sun4v/include/profile.h#2 integrate
.. //depot/projects/smpng/sys/sys/callout.h#11 integrate
.. //depot/projects/smpng/sys/sys/param.h#117 integrate
.. //depot/projects/smpng/sys/sys/sysent.h#27 integrate
.. //depot/projects/smpng/sys/vm/uma_int.h#30 integrate

Differences ...

==== //depot/projects/smpng/sys/amd64/conf/GENERIC#58 (text+ko) ====

@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.475 2007/04/10 21:40:12 pjd Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.477 2007/05/10 01:39:50 kevlo Exp $
 
 cpu		HAMMER
 ident		GENERIC
@@ -97,6 +97,7 @@
 options 	AHD_REG_PRETTY_PRINT	# Print register bitfields in debug
 					# output.  Adds ~215k to driver.
 device		amd		# AMD 53C974 (Tekram DC-390(T))
+device		hptiop		# Highpoint RocketRaid 3xxx series
 device		isp		# Qlogic family
 #device 	ispfw		# Firmware for QLogic HBAs- normally a module
 device		mpt		# LSI-Logic MPT-Fusion
@@ -230,6 +231,7 @@
 device		wlan_wep	# 802.11 WEP support
 device		wlan_ccmp	# 802.11 CCMP support
 device		wlan_tkip	# 802.11 TKIP support
+device		wlan_amrr	# AMRR transmit rate control algorithm
 device		an		# Aironet 4500/4800 802.11 wireless NICs.
 device		ath		# Atheros pci/cardbus NIC's
 device		ath_hal		# Atheros HAL (Hardware Access Layer)

==== //depot/projects/smpng/sys/amd64/conf/NOTES#38 (text+ko) ====

@@ -4,7 +4,7 @@
 # This file contains machine dependent kernel configuration notes.  For
 # machine independent notes, look in /sys/conf/NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.64 2007/03/22 18:16:38 jkim Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.65 2007/05/09 15:55:45 scottl Exp $
 #
 
 #
@@ -377,6 +377,10 @@
 device		rr232x
 
 #
+# Highpoint RocketRaid 3xxx series SATA RAID
+device		hptiop
+
+#
 # IBM (now Adaptec) ServeRAID controllers
 device		ips
 

==== //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#24 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.42 2007/04/18 20:12:05 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.43 2007/05/11 01:25:50 kan Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -561,12 +561,13 @@
 #endif
 
 	exit_signal = args->flags & 0x000000ff;
-	if (!LINUX_SIG_VALID(exit_signal) && exit_signal != 0)
+	if (LINUX_SIG_VALID(exit_signal)) {
+		if (exit_signal <= LINUX_SIGTBLSZ)
+			exit_signal =
+			    linux_to_bsd_signal[_SIG_IDX(exit_signal)];
+	} else if (exit_signal != 0)
 		return (EINVAL);
 
-	if (exit_signal <= LINUX_SIGTBLSZ)
-		exit_signal = linux_to_bsd_signal[_SIG_IDX(exit_signal)];
-
 	if (args->flags & LINUX_CLONE_VM)
 		ff |= RFMEM;
 	if (args->flags & LINUX_CLONE_SIGHAND)

==== //depot/projects/smpng/sys/amd64/linux32/linux32_sysvec.c#26 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.28 2007/04/02 18:38:12 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.29 2007/05/14 22:40:04 jhb Exp $");
 #include "opt_compat.h"
 
 #ifndef COMPAT_IA32

==== //depot/projects/smpng/sys/boot/common/loader.8#45 (text+ko) ====

@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.92 2007/05/05 17:36:42 jmg Exp $
+.\" $FreeBSD: src/sys/boot/common/loader.8,v 1.93 2007/05/09 02:37:58 sepotvin Exp $
 .\"
-.Dd May 5, 2007
+.Dd May 8, 2007
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -615,6 +615,15 @@
 This overrides the value determined when the kernel was compiled.
 Modifies
 .Dv VM_KMEM_SIZE .
+.It Va vm.kmem_size_min
+.It Va vm.kmem_size_max
+Sets the minimum and maximum (respectively) amount of kernel memory
+that will be automatically allocated by the kernel.
+These override the values determined when the kernel was compiled.
+Modifies
+.Dv VM_KMEM_SIZE_MIN
+and
+.Dv VM_KMEM_SIZE_MAX .
 .El
 .Ss BUILTIN PARSER
 When a builtin command is executed, the rest of the line is taken

==== //depot/projects/smpng/sys/cam/cam_periph.c#25 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.68 2007/04/19 23:34:51 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.69 2007/05/14 21:48:52 scottl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,7 +102,8 @@
 	int ndrivers;
 
 	ndrivers = nperiph_drivers + 2;
-	newdrivers = malloc(sizeof(*newdrivers) * ndrivers, M_TEMP, M_WAITOK);
+	newdrivers = malloc(sizeof(*newdrivers) * ndrivers, M_CAMPERIPH,
+			    M_WAITOK);
 	if (periph_drivers)
 		bcopy(periph_drivers, newdrivers,
 		      sizeof(*newdrivers) * nperiph_drivers);
@@ -111,7 +112,7 @@
 	old = periph_drivers;
 	periph_drivers = newdrivers;
 	if (old)
-		free(old, M_TEMP);
+		free(old, M_CAMPERIPH);
 	nperiph_drivers++;
 }
 

==== //depot/projects/smpng/sys/cam/cam_xpt.c#45 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.183 2007/04/27 14:23:05 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.184 2007/05/14 21:48:52 scottl Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -1533,7 +1533,7 @@
 	 */
 	xsoftc.xpt_config_hook =
 	    (struct intr_config_hook *)malloc(sizeof(struct intr_config_hook),
-					      M_TEMP, M_NOWAIT | M_ZERO);
+					      M_CAMXPT, M_NOWAIT | M_ZERO);
 	if (xsoftc.xpt_config_hook == NULL) {
 		printf("xpt_init: Cannot malloc config hook "
 		       "- failing attach\n");
@@ -1542,7 +1542,7 @@
 
 	xsoftc.xpt_config_hook->ich_func = xpt_config;
 	if (config_intrhook_establish(xsoftc.xpt_config_hook) != 0) {
-		free (xsoftc.xpt_config_hook, M_TEMP);
+		free (xsoftc.xpt_config_hook, M_CAMXPT);
 		printf("xpt_init: config_intrhook_establish failed "
 		       "- failing attach\n");
 	}
@@ -5243,7 +5243,7 @@
 
 		/* Save some state for use while we probe for devices */
 		scan_info = (xpt_scan_bus_info *)
-		    malloc(sizeof(xpt_scan_bus_info), M_TEMP, M_NOWAIT);
+		    malloc(sizeof(xpt_scan_bus_info), M_CAMXPT, M_NOWAIT);
 		scan_info->request_ccb = request_ccb;
 		scan_info->cpi = &work_ccb->cpi;
 
@@ -5277,7 +5277,7 @@
 				printf("xpt_scan_bus: xpt_create_path failed"
 				       " with status %#x, bus scan halted\n",
 				       status);
-				free(scan_info, M_TEMP);
+				free(scan_info, M_CAMXPT);
 				request_ccb->ccb_h.status = status;
 				xpt_free_ccb(work_ccb);
 				xpt_done(request_ccb);
@@ -5285,7 +5285,7 @@
 			}
 			work_ccb = xpt_alloc_ccb_nowait();
 			if (work_ccb == NULL) {
-				free(scan_info, M_TEMP);
+				free(scan_info, M_CAMXPT);
 				xpt_free_path(path);
 				request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
 				xpt_done(request_ccb);
@@ -5398,7 +5398,7 @@
 				xpt_free_ccb(request_ccb);
 				xpt_free_ccb((union ccb *)scan_info->cpi);
 				request_ccb = scan_info->request_ccb;
-				free(scan_info, M_TEMP);
+				free(scan_info, M_CAMXPT);
 				request_ccb->ccb_h.status = CAM_REQ_CMP;
 				xpt_done(request_ccb);
 				break;
@@ -5417,7 +5417,7 @@
 				xpt_free_ccb(request_ccb);
 				xpt_free_ccb((union ccb *)scan_info->cpi);
 				request_ccb = scan_info->request_ccb;
-				free(scan_info, M_TEMP);
+				free(scan_info, M_CAMXPT);
 				request_ccb->ccb_h.status = status;
 				xpt_done(request_ccb);
 				break;
@@ -5518,17 +5518,17 @@
 	}
 
 	if (request_ccb == NULL) {
-		request_ccb = malloc(sizeof(union ccb), M_TEMP, M_NOWAIT);
+		request_ccb = malloc(sizeof(union ccb), M_CAMXPT, M_NOWAIT);
 		if (request_ccb == NULL) {
 			xpt_print(path, "xpt_scan_lun: can't allocate CCB, "
 			    "can't continue\n");
 			return;
 		}
-		new_path = malloc(sizeof(*new_path), M_TEMP, M_NOWAIT);
+		new_path = malloc(sizeof(*new_path), M_CAMXPT, M_NOWAIT);
 		if (new_path == NULL) {
 			xpt_print(path, "xpt_scan_lun: can't allocate path, "
 			    "can't continue\n");
-			free(request_ccb, M_TEMP);
+			free(request_ccb, M_CAMXPT);
 			return;
 		}
 		status = xpt_compile_path(new_path, xpt_periph,
@@ -5539,8 +5539,8 @@
 		if (status != CAM_REQ_CMP) {
 			xpt_print(path, "xpt_scan_lun: can't compile path, "
 			    "can't continue\n");
-			free(request_ccb, M_TEMP);
-			free(new_path, M_TEMP);
+			free(request_ccb, M_CAMXPT);
+			free(new_path, M_CAMXPT);
 			return;
 		}
 		xpt_setup_ccb(&request_ccb->ccb_h, new_path, /*priority*/ 1);
@@ -5575,8 +5575,8 @@
 xptscandone(struct cam_periph *periph, union ccb *done_ccb)
 {
 	xpt_release_path(done_ccb->ccb_h.path);
-	free(done_ccb->ccb_h.path, M_TEMP);
-	free(done_ccb, M_TEMP);
+	free(done_ccb->ccb_h.path, M_CAMXPT);
+	free(done_ccb, M_CAMXPT);
 }
 
 static cam_status
@@ -5598,7 +5598,7 @@
 		return(CAM_REQ_CMP_ERR);
 	}
 
-	softc = (probe_softc *)malloc(sizeof(*softc), M_TEMP, M_NOWAIT);
+	softc = (probe_softc *)malloc(sizeof(*softc), M_CAMXPT, M_NOWAIT);
 
 	if (softc == NULL) {
 		printf("proberegister: Unable to probe new device. "
@@ -5751,7 +5751,7 @@
 	
 		if (softc->action == PROBE_INQUIRY_BASIC_DV1
 		 || softc->action == PROBE_INQUIRY_BASIC_DV2) {
-			inq_buf = malloc(inquiry_len, M_TEMP, M_NOWAIT);
+			inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT);
 		}
 		if (inq_buf == NULL) {
 			xpt_print(periph->path, "malloc failure- skipping Basic"
@@ -5785,7 +5785,7 @@
 		mode_buf_len = sizeof(struct scsi_mode_header_6)
 			     + sizeof(struct scsi_mode_blk_desc)
 			     + sizeof(struct scsi_control_page);
-		mode_buf = malloc(mode_buf_len, M_TEMP, M_NOWAIT);
+		mode_buf = malloc(mode_buf_len, M_CAMXPT, M_NOWAIT);
 		if (mode_buf != NULL) {
 	                scsi_mode_sense(csio,
 					/*retries*/4,
@@ -5817,7 +5817,7 @@
 
 		if ((device->quirk->quirks & CAM_QUIRK_NOSERIAL) == 0)
 			serial_buf = (struct scsi_vpd_unit_serial_number *)
-				malloc(sizeof(*serial_buf), M_TEMP,
+				malloc(sizeof(*serial_buf), M_CAMXPT,
 					M_NOWAIT | M_ZERO);
 
 		if (serial_buf != NULL) {
@@ -6107,7 +6107,7 @@
 					 /*count*/1, /*run_queue*/TRUE);
 		}
 		xpt_release_ccb(done_ccb);
-		free(mode_hdr, M_TEMP);
+		free(mode_hdr, M_CAMXPT);
 		softc->action = PROBE_SERIAL_NUM;
 		xpt_schedule(periph, priority);
 		return;
@@ -6194,7 +6194,7 @@
 				xpt_async(AC_LOST_DEVICE, path, NULL);
 		}
 		if (serial_buf != NULL)
-			free(serial_buf, M_TEMP);
+			free(serial_buf, M_CAMXPT);
 
 		if (changed != 0) {
 			/*
@@ -6283,12 +6283,12 @@
 				/* give up */
 				softc->action = PROBE_DV_EXIT;
 			}
-			free(nbuf, M_TEMP);
+			free(nbuf, M_CAMXPT);
 			xpt_release_ccb(done_ccb);
 			xpt_schedule(periph, priority);
 			return;
 		}
-		free(nbuf, M_TEMP);
+		free(nbuf, M_CAMXPT);
 		if (softc->action == PROBE_INQUIRY_BASIC_DV1) {
 			softc->action = PROBE_INQUIRY_BASIC_DV2;
 			xpt_release_ccb(done_ccb);
@@ -6327,7 +6327,7 @@
 static void
 probecleanup(struct cam_periph *periph)
 {
-	free(periph->softc, M_TEMP);
+	free(periph->softc, M_CAMXPT);
 }
 
 static void
@@ -6984,7 +6984,7 @@
 
 		/* Release our hook so that the boot can continue. */
 		config_intrhook_disestablish(xsoftc.xpt_config_hook);
-		free(xsoftc.xpt_config_hook, M_TEMP);
+		free(xsoftc.xpt_config_hook, M_CAMXPT);
 		xsoftc.xpt_config_hook = NULL;
 	}
 

==== //depot/projects/smpng/sys/cam/scsi/scsi_cd.c#32 (text+ko) ====

@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.99 2007/04/16 19:41:14 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.100 2007/05/14 21:48:53 scottl Exp $");
 
 #include "opt_cd.h"
 
@@ -329,6 +329,8 @@
 static STAILQ_HEAD(changerlist, cdchanger) changerq;
 static int num_changers;
 
+MALLOC_DEFINE(M_SCSICD, "scsi_cd", "scsi_cd buffers");
+
 static void
 cdinit(void)
 {
@@ -1519,7 +1521,7 @@
 	{
 
 		rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcap),
-								M_TEMP,
+								M_SCSICD,
 								M_NOWAIT);
 		if (rcap == NULL) {
 			xpt_print(periph->path,
@@ -1778,7 +1780,7 @@
 				}
 			}
 		}
-		free(rdcap, M_TEMP);
+		free(rdcap, M_SCSICD);
 		if (announce_buf[0] != '\0') {
 			xpt_announce_periph(periph, announce_buf);
 			if (softc->flags & CD_FLAG_CHANGER)
@@ -1906,7 +1908,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP,
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD,
 						 M_WAITOK | M_ZERO);
 
 			cam_periph_lock(periph);
@@ -1915,7 +1917,7 @@
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(params.mode_buf, M_TEMP);
+				free(params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -1924,7 +1926,7 @@
 			page->audio.flags &= ~CD_PA_SOTC;
 			page->audio.flags |= CD_PA_IMMED;
 			error = cdsetmode(periph, &params);
-			free(params.mode_buf, M_TEMP);
+			free(params.mode_buf, M_SCSICD);
 			if (error) {
 				cam_periph_unlock(periph);
 				break;
@@ -2001,7 +2003,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP,
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD,
 						 M_WAITOK | M_ZERO);
 
 			cam_periph_lock(periph);
@@ -2010,7 +2012,7 @@
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(params.mode_buf, M_TEMP);
+				free(params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2019,7 +2021,7 @@
 			page->audio.flags &= ~CD_PA_SOTC;
 			page->audio.flags |= CD_PA_IMMED;
 			error = cdsetmode(periph, &params);
-			free(params.mode_buf, M_TEMP);
+			free(params.mode_buf, M_SCSICD);
 			if (error) {
 				cam_periph_unlock(periph);
 				break;
@@ -2042,7 +2044,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP,
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD,
 						 M_WAITOK | M_ZERO);
 
 			cam_periph_lock(periph);
@@ -2052,7 +2054,7 @@
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(params.mode_buf, M_TEMP);
+				free(params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2061,7 +2063,7 @@
 			page->audio.flags &= ~CD_PA_SOTC;
 			page->audio.flags |= CD_PA_IMMED;
 			error = cdsetmode(periph, &params);
-			free(params.mode_buf, M_TEMP);
+			free(params.mode_buf, M_SCSICD);
 			if (error) {
 				cam_periph_unlock(periph);
 				break;
@@ -2081,7 +2083,7 @@
 			u_int32_t len = args->data_len;
 
 			data = malloc(sizeof(struct cd_sub_channel_info), 
-				      M_TEMP, M_WAITOK);
+				      M_SCSICD, M_WAITOK);
 
 			cam_periph_lock(periph);
 			CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, 
@@ -2094,7 +2096,7 @@
 					"cdioreadsubchannel: error, len=%d\n",
 					len);
 				error = EINVAL;
-				free(data, M_TEMP);
+				free(data, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2106,7 +2108,7 @@
 				args->data_format, args->track, data, len);
 
 			if (error) {
-				free(data, M_TEMP);
+				free(data, M_SCSICD);
 				cam_periph_unlock(periph);
 	 			break;
 			}
@@ -2124,7 +2126,7 @@
 			} else {
 				bcopy(data, args->data, len);
 			}
-			free(data, M_TEMP);
+			free(data, M_SCSICD);
 		}
 		break;
 
@@ -2132,7 +2134,7 @@
 		{
 			struct ioc_toc_header *th;
 
-			th = malloc(sizeof(struct ioc_toc_header), M_TEMP,
+			th = malloc(sizeof(struct ioc_toc_header), M_SCSICD,
 				    M_WAITOK);
 
 			cam_periph_lock(periph);
@@ -2142,7 +2144,7 @@
 			error = cdreadtoc(periph, 0, 0, (u_int8_t *)th, 
 				          sizeof (*th), /*sense_flags*/0);
 			if (error) {
-				free(th, M_TEMP);
+				free(th, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2156,7 +2158,7 @@
 			}
 			th->len = ntohs(th->len);
 			bcopy(th, addr, sizeof(*th));
-			free(th, M_TEMP);
+			free(th, M_SCSICD);
 			cam_periph_unlock(periph);
 		}
 		break;
@@ -2170,8 +2172,8 @@
 			u_int32_t len, readlen, idx, num;
 			u_int32_t starting_track = te->starting_track;
 
-			data = malloc(sizeof(*data), M_TEMP, M_WAITOK);
-			lead = malloc(sizeof(*lead), M_TEMP, M_WAITOK);
+			data = malloc(sizeof(*data), M_SCSICD, M_WAITOK);
+			lead = malloc(sizeof(*lead), M_SCSICD, M_WAITOK);
 
 			cam_periph_lock(periph);
 			CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, 
@@ -2184,8 +2186,8 @@
 				error = EINVAL;
 				printf("scsi_cd: error in readtocentries, "
 				       "returning EINVAL\n");
-				free(data, M_TEMP);
-				free(lead, M_TEMP);
+				free(data, M_SCSICD);
+				free(lead, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2194,8 +2196,8 @@
 			error = cdreadtoc(periph, 0, 0, (u_int8_t *)th, 
 					  sizeof (*th), /*sense_flags*/0);
 			if (error) {
-				free(data, M_TEMP);
-				free(lead, M_TEMP);
+				free(data, M_SCSICD);
+				free(lead, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2217,8 +2219,8 @@
 				 starting_track > th->ending_track + 1) {
 				printf("scsi_cd: error in readtocentries, "
 				       "returning EINVAL\n");
-				free(data, M_TEMP);
-				free(lead, M_TEMP);
+				free(data, M_SCSICD);
+				free(lead, M_SCSICD);
 				cam_periph_unlock(periph);
 				error = EINVAL;
 				break;
@@ -2239,8 +2241,8 @@
 				printf("scsi_cd: error in readtocentries, "
 				       "returning EINVAL\n");
 				error = EINVAL;
-				free(data, M_TEMP);
-				free(lead, M_TEMP);
+				free(data, M_SCSICD);
+				free(lead, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2253,8 +2255,8 @@
 						  readlen + sizeof (*th),
 						  /*sense_flags*/0);
 				if (error) {
-					free(data, M_TEMP);
-					free(lead, M_TEMP);
+					free(data, M_SCSICD);
+					free(lead, M_SCSICD);
 					cam_periph_unlock(periph);
 					break;
 				}
@@ -2270,8 +2272,8 @@
 						  sizeof(*lead),
 						  /*sense_flags*/0);
 				if (error) {
-					free(data, M_TEMP);
-					free(lead, M_TEMP);
+					free(data, M_SCSICD);
+					free(lead, M_SCSICD);
 					cam_periph_unlock(periph);
 					break;
 				}
@@ -2287,8 +2289,8 @@
 
 			cam_periph_unlock(periph);
 			error = copyout(data->entries, te->data, len);
-			free(data, M_TEMP);
-			free(lead, M_TEMP);
+			free(data, M_SCSICD);
+			free(lead, M_SCSICD);
 		}
 		break;
 	case CDIOREADTOCENTRY:
@@ -2299,7 +2301,7 @@
 			struct ioc_toc_header *th;
 			u_int32_t track;
 
-			data = malloc(sizeof(*data), M_TEMP, M_WAITOK);
+			data = malloc(sizeof(*data), M_SCSICD, M_WAITOK);
 
 			cam_periph_lock(periph);
 			CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, 
@@ -2309,7 +2311,7 @@
 			    && te->address_format != CD_LBA_FORMAT) {
 				printf("error in readtocentry, "
 				       " returning EINVAL\n");
-				free(data, M_TEMP);
+				free(data, M_SCSICD);
 				error = EINVAL;
 				cam_periph_unlock(periph);
 				break;
@@ -2319,7 +2321,7 @@
 			error = cdreadtoc(periph, 0, 0, (u_int8_t *)th,
 					  sizeof (*th), /*sense_flags*/0);
 			if (error) {
-				free(data, M_TEMP);
+				free(data, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2341,7 +2343,7 @@
 				 track > th->ending_track + 1) {
 				printf("error in readtocentry, "
 				       " returning EINVAL\n");
-				free(data, M_TEMP);
+				free(data, M_SCSICD);
 				error = EINVAL;
 				cam_periph_unlock(periph);
 				break;
@@ -2351,7 +2353,7 @@
 					  (u_int8_t *)data, sizeof(*data),
 					  /*sense_flags*/0);
 			if (error) {
-				free(data, M_TEMP);
+				free(data, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2360,7 +2362,7 @@
 				data->entry.track = bcd2bin(data->entry.track);
 			bcopy(&data->entry, &te->entry,
 			      sizeof(struct cd_toc_entry));
-			free(data, M_TEMP);
+			free(data, M_SCSICD);
 			cam_periph_unlock(periph);
 		}
 		break;
@@ -2371,7 +2373,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP, 
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD, 
 						 M_WAITOK | M_ZERO);
 
 			cam_periph_lock(periph);
@@ -2380,7 +2382,7 @@
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(params.mode_buf, M_TEMP);
+				free(params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2393,7 +2395,7 @@
 			page->audio.port[2].channels = arg->patch[2];
 			page->audio.port[3].channels = arg->patch[3];
 			error = cdsetmode(periph, &params);
-			free(params.mode_buf, M_TEMP);
+			free(params.mode_buf, M_SCSICD);
 			cam_periph_unlock(periph);
 		}
 		break;
@@ -2404,7 +2406,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP, 
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD, 
 						 M_WAITOK | M_ZERO);
 
 			cam_periph_lock(periph);
@@ -2413,7 +2415,7 @@
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(params.mode_buf, M_TEMP);
+				free(params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2425,7 +2427,7 @@
 				page->audio.port[RIGHT_PORT].volume;
 			arg->vol[2] = page->audio.port[2].volume;
 			arg->vol[3] = page->audio.port[3].volume;
-			free(params.mode_buf, M_TEMP);
+			free(params.mode_buf, M_SCSICD);
 			cam_periph_unlock(periph);
 		}
 		break;
@@ -2436,7 +2438,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP, 
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD, 
 						 M_WAITOK | M_ZERO);
 
 			cam_periph_lock(periph);
@@ -2445,7 +2447,7 @@
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(params.mode_buf, M_TEMP);
+				free(params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2461,7 +2463,7 @@
 			page->audio.port[3].volume = arg->vol[3];
 			error = cdsetmode(periph, &params);
 			cam_periph_unlock(periph);
-			free(params.mode_buf, M_TEMP);
+			free(params.mode_buf, M_SCSICD);
 		}
 		break;
 	case CDIOCSETMONO:
@@ -2470,7 +2472,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP,
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD,
 						 M_WAITOK | M_ZERO);
 
 			cam_periph_lock(periph);
@@ -2479,7 +2481,7 @@
 
 			error = cdgetmode(periph, &params, AUDIO_PAGE);
 			if (error) {
-				free(params.mode_buf, M_TEMP);
+				free(params.mode_buf, M_SCSICD);
 				cam_periph_unlock(periph);
 				break;
 			}
@@ -2493,7 +2495,7 @@
 			page->audio.port[3].channels = 0;
 			error = cdsetmode(periph, &params);
 			cam_periph_unlock(periph);
-			free(params.mode_buf, M_TEMP);
+			free(params.mode_buf, M_SCSICD);
 		}
 		break;
 	case CDIOCSETSTEREO:
@@ -2502,7 +2504,7 @@
 			union cd_pages *page;
 
 			params.alloc_len = sizeof(union cd_mode_data_6_10);
-			params.mode_buf = malloc(params.alloc_len, M_TEMP,
+			params.mode_buf = malloc(params.alloc_len, M_SCSICD,
 						 M_WAITOK | M_ZERO);

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


More information about the p4-projects mailing list