Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2006 01:31:24 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 108994 for review
Message-ID:  <200611020131.kA21VONW007739@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=108994

Change 108994 by marcel@marcel_cluster on 2006/11/02 01:31:07

	IFC @108992

Affected files ...

.. //depot/projects/ia64/sys/boot/common/bootstrap.h#10 integrate
.. //depot/projects/ia64/sys/boot/efi/libefi/efifs.c#16 integrate
.. //depot/projects/ia64/sys/boot/i386/libi386/bioscd.c#9 integrate
.. //depot/projects/ia64/sys/boot/i386/libi386/biosdisk.c#14 integrate
.. //depot/projects/ia64/sys/boot/i386/libi386/bootinfo32.c#4 integrate
.. //depot/projects/ia64/sys/boot/i386/libi386/devicename.c#6 integrate
.. //depot/projects/ia64/sys/boot/i386/libi386/libi386.h#14 integrate
.. //depot/projects/ia64/sys/boot/i386/loader/main.c#14 integrate
.. //depot/projects/ia64/sys/boot/ia64/efi/main.c#7 integrate
.. //depot/projects/ia64/sys/boot/ia64/ski/libski.h#3 integrate
.. //depot/projects/ia64/sys/boot/ia64/ski/main.c#4 integrate
.. //depot/projects/ia64/sys/boot/ofw/libofw/libofw.h#9 integrate
.. //depot/projects/ia64/sys/boot/pc98/libpc98/bioscd.c#3 integrate
.. //depot/projects/ia64/sys/boot/pc98/libpc98/biosdisk.c#13 integrate
.. //depot/projects/ia64/sys/boot/pc98/loader/main.c#12 integrate
.. //depot/projects/ia64/sys/cam/cam_ccb.h#10 integrate
.. //depot/projects/ia64/sys/cam/cam_xpt.c#33 integrate
.. //depot/projects/ia64/sys/cam/scsi/scsi_low.c#17 integrate
.. //depot/projects/ia64/sys/conf/NOTES#108 integrate
.. //depot/projects/ia64/sys/conf/options#99 integrate
.. //depot/projects/ia64/sys/dev/aac/aac_cam.c#21 integrate
.. //depot/projects/ia64/sys/dev/advansys/advansys.c#13 integrate
.. //depot/projects/ia64/sys/dev/advansys/advlib.c#9 integrate
.. //depot/projects/ia64/sys/dev/advansys/adwcam.c#14 integrate
.. //depot/projects/ia64/sys/dev/aha/aha.c#16 integrate
.. //depot/projects/ia64/sys/dev/ahb/ahb.c#15 integrate
.. //depot/projects/ia64/sys/dev/aic/aic.c#12 integrate
.. //depot/projects/ia64/sys/dev/aic7xxx/aic79xx_osm.c#21 integrate
.. //depot/projects/ia64/sys/dev/aic7xxx/aic79xx_osm.h#18 integrate
.. //depot/projects/ia64/sys/dev/aic7xxx/aic7xxx_osm.c#20 integrate
.. //depot/projects/ia64/sys/dev/aic7xxx/aic7xxx_osm.h#20 integrate
.. //depot/projects/ia64/sys/dev/amd/amd.c#17 integrate
.. //depot/projects/ia64/sys/dev/amr/amr_cam.c#17 integrate
.. //depot/projects/ia64/sys/dev/arcmsr/arcmsr.c#8 integrate
.. //depot/projects/ia64/sys/dev/asr/asr.c#33 integrate
.. //depot/projects/ia64/sys/dev/ata/atapi-cam.c#31 integrate
.. //depot/projects/ia64/sys/dev/buslogic/bt.c#16 integrate
.. //depot/projects/ia64/sys/dev/ciss/ciss.c#47 integrate
.. //depot/projects/ia64/sys/dev/dpt/dpt_scsi.c#19 integrate
.. //depot/projects/ia64/sys/dev/esp/ncr53c9x.c#9 integrate
.. //depot/projects/ia64/sys/dev/firewire/sbp.c#54 integrate
.. //depot/projects/ia64/sys/dev/iir/iir.c#17 integrate
.. //depot/projects/ia64/sys/dev/isp/isp_freebsd.c#33 integrate
.. //depot/projects/ia64/sys/dev/mly/mly.c#26 integrate
.. //depot/projects/ia64/sys/dev/mpt/mpt_cam.c#10 integrate
.. //depot/projects/ia64/sys/dev/sym/sym_hipd.c#26 integrate
.. //depot/projects/ia64/sys/dev/trm/trm.c#27 integrate
.. //depot/projects/ia64/sys/dev/twa/tw_osl_cam.c#7 integrate
.. //depot/projects/ia64/sys/dev/usb/umass.c#52 integrate
.. //depot/projects/ia64/sys/geom/journal/g_journal.c#2 integrate
.. //depot/projects/ia64/sys/net/bridgestp.c#8 integrate
.. //depot/projects/ia64/sys/pci/ncr.c#24 integrate

Differences ...

==== //depot/projects/ia64/sys/boot/common/bootstrap.h#10 (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/boot/common/bootstrap.h,v 1.42 2005/12/18 04:52:35 marcel Exp $
+ * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.43 2006/11/02 01:23:17 marcel Exp $
  */
 
 #include <sys/types.h>

==== //depot/projects/ia64/sys/boot/efi/libefi/efifs.c#16 (text+ko) ====


==== //depot/projects/ia64/sys/boot/i386/libi386/bioscd.c#9 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/bioscd.c,v 1.8 2005/05/20 13:14:18 charnier Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/bioscd.c,v 1.9 2006/11/02 01:23:17 marcel Exp $");
 
 /*
  * BIOS CD device handling for CD's that have been booted off of via no

==== //depot/projects/ia64/sys/boot/i386/libi386/biosdisk.c#14 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.47 2006/05/31 09:05:49 iedowse Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.48 2006/11/02 01:23:17 marcel Exp $");
 
 /*
  * BIOS disk device handling.

==== //depot/projects/ia64/sys/boot/i386/libi386/bootinfo32.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/bootinfo32.c,v 1.36 2003/08/25 23:28:31 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/bootinfo32.c,v 1.37 2006/11/02 01:23:17 marcel Exp $");
 
 #include <stand.h>
 #include <sys/param.h>

==== //depot/projects/ia64/sys/boot/i386/libi386/devicename.c#6 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/devicename.c,v 1.7 2005/05/27 19:28:04 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/devicename.c,v 1.8 2006/11/02 01:23:17 marcel Exp $");
 
 #include <stand.h>
 #include <string.h>

==== //depot/projects/ia64/sys/boot/i386/libi386/libi386.h#14 (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/boot/i386/libi386/libi386.h,v 1.26 2006/09/29 20:27:41 ru Exp $
+ * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.27 2006/11/02 01:23:17 marcel Exp $
  */
 
 

==== //depot/projects/ia64/sys/boot/i386/loader/main.c#14 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.37 2006/08/04 07:56:32 yar Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.38 2006/11/02 01:23:18 marcel Exp $");
 
 /*
  * MD bootstrap main() and assorted miscellaneous

==== //depot/projects/ia64/sys/boot/ia64/efi/main.c#7 (text+ko) ====


==== //depot/projects/ia64/sys/boot/ia64/ski/libski.h#3 (text+ko) ====


==== //depot/projects/ia64/sys/boot/ia64/ski/main.c#4 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/ia64/ski/main.c,v 1.7 2006/11/02 00:26:45 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/ia64/ski/main.c,v 1.8 2006/11/02 01:23:18 marcel Exp $");
 
 #include <stand.h>
 #include <string.h>

==== //depot/projects/ia64/sys/boot/ofw/libofw/libofw.h#9 (text+ko) ====

@@ -22,7 +22,7 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/boot/ofw/libofw/libofw.h,v 1.11 2005/10/20 11:14:34 marius Exp $
+ * $FreeBSD: src/sys/boot/ofw/libofw/libofw.h,v 1.12 2006/11/02 01:23:18 marcel Exp $
  */
 
 #include "openfirm.h"

==== //depot/projects/ia64/sys/boot/pc98/libpc98/bioscd.c#3 (text) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/bioscd.c,v 1.1 2006/05/14 07:26:02 nyan Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/bioscd.c,v 1.2 2006/11/02 01:23:18 marcel Exp $");
 
 /*
  * BIOS CD device handling for CD's that have been booted off of via no

==== //depot/projects/ia64/sys/boot/pc98/libpc98/biosdisk.c#13 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/biosdisk.c,v 1.33 2005/12/21 06:09:09 nyan Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/pc98/libpc98/biosdisk.c,v 1.34 2006/11/02 01:23:18 marcel Exp $");
 
 /*
  * BIOS disk device handling.

==== //depot/projects/ia64/sys/boot/pc98/loader/main.c#12 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/pc98/loader/main.c,v 1.23 2006/08/04 07:56:32 yar Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/pc98/loader/main.c,v 1.24 2006/11/02 01:23:18 marcel Exp $");
 
 /*
  * MD bootstrap main() and assorted miscellaneous

==== //depot/projects/ia64/sys/cam/cam_ccb.h#10 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.32 2006/06/05 22:22:14 mjacob Exp $
+ * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.33 2006/11/02 00:54:32 mjacob Exp $
  */
 
 #ifndef _CAM_CAM_CCB_H
@@ -34,9 +34,7 @@
 #include <sys/queue.h>
 #include <sys/cdefs.h>
 #include <sys/time.h>
-#ifdef CAM_NEW_TRAN_CODE
 #include <sys/limits.h>
-#endif /* CAM_NEW_TRAN_CODE */
 #ifndef _KERNEL
 #include <sys/callout.h>
 #endif
@@ -209,7 +207,6 @@
 #define XPT_FC_IS_QUEUED(ccb) 	\
     (((ccb)->ccb_h.func_code & XPT_FC_QUEUED) != 0)
 
-#ifdef CAM_NEW_TRAN_CODE
 typedef enum {
 	PROTO_UNKNOWN,
 	PROTO_UNSPECIFIED,
@@ -234,7 +231,6 @@
 #define PROTO_VERSION_UNSPECIFIED UINT_MAX
 #define XPORT_VERSION_UNKNOWN (UINT_MAX - 1)
 #define XPORT_VERSION_UNSPECIFIED UINT_MAX
-#endif /* CAM_NEW_TRAN_CODE */
 
 typedef union {
 	LIST_ENTRY(ccb_hdr) le;
@@ -518,7 +514,6 @@
 	PIM_SEQSCAN	= 0x04	/* Do bus scans sequentially, not in parallel */
 } pi_miscflag;
 
-#ifdef CAM_NEW_TRAN_CODE
 /* Path Inquiry CCB */
 struct ccb_pathinq_settings_spi {
 	u_int8_t ppr_options;
@@ -533,7 +528,6 @@
 	u_int32_t bitrate;	/* Mbps */
 };
 #define	PATHINQ_SETTINGS_SIZE	128
-#endif /* CAM_NEW_TRAN_CODE */
 
 struct ccb_pathinq {
 	struct 	    ccb_hdr ccb_h;
@@ -555,7 +549,6 @@
 	u_int32_t   unit_number;	/* Unit number for SIM */
 	u_int32_t   bus_id;		/* Bus ID for SIM */
 	u_int32_t   base_transfer_speed;/* Base bus speed in KB/sec */
-#ifdef CAM_NEW_TRAN_CODE
 	cam_proto   protocol;
 	u_int	    protocol_version;
 	cam_xport   transport;
@@ -566,7 +559,6 @@
 		struct ccb_pathinq_settings_sas sas;
 		char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE];
 	} xport_specific;
-#endif /* CAM_NEW_TRAN_CODE */
 };
 
 /* Path Statistics CCB */
@@ -704,27 +696,6 @@
 	union	ccb *termio_ccb;	/* Pointer to CCB to terminate */
 };
 
-#ifndef CAM_NEW_TRAN_CODE
-/* Get/Set transfer rate/width/disconnection/tag queueing settings */
-struct ccb_trans_settings {
-	struct	ccb_hdr ccb_h;
-	u_int	valid;  /* Which fields to honor */
-#define		CCB_TRANS_SYNC_RATE_VALID	0x01
-#define		CCB_TRANS_SYNC_OFFSET_VALID	0x02
-#define		CCB_TRANS_BUS_WIDTH_VALID	0x04
-#define		CCB_TRANS_DISC_VALID		0x08
-#define		CCB_TRANS_TQ_VALID		0x10
-	u_int	flags;
-#define		CCB_TRANS_CURRENT_SETTINGS	0x01
-#define		CCB_TRANS_USER_SETTINGS		0x02
-#define		CCB_TRANS_DISC_ENB		0x04
-#define		CCB_TRANS_TAG_ENB		0x08
-	u_int	sync_period;
-	u_int	sync_offset;
-	u_int	bus_width;
-};
-
-#else /* CAM_NEW_TRAN_CODE */
 typedef enum {
 	CTS_TYPE_CURRENT_SETTINGS,
 	CTS_TYPE_USER_SETTINGS
@@ -794,7 +765,6 @@
 	} xport_specific;
 };
 
-#endif /* CAM_NEW_TRAN_CODE */
 
 /*
  * Calculate the geometry parameters for a device

==== //depot/projects/ia64/sys/cam/cam_xpt.c#33 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.165 2006/09/16 17:35:47 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.166 2006/11/02 00:54:33 mjacob Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -127,12 +127,10 @@
 	struct	cam_periph *owner;	/* Peripheral driver's ownership tag */
 	struct	xpt_quirk_entry *quirk;	/* Oddities about this device */
 					/* Storage for the inquiry data */
-#ifdef CAM_NEW_TRAN_CODE
 	cam_proto	 protocol;
 	u_int		 protocol_version;
 	cam_xport	 transport;
 	u_int		 transport_version;
-#endif /* CAM_NEW_TRAN_CODE */
 	struct		 scsi_inquiry_data inq_data;
 	u_int8_t	 inq_flags;	/*
 					 * Current settings for inquiry flags.
@@ -876,9 +874,7 @@
 static void	 probedone(struct cam_periph *periph, union ccb *done_ccb);
 static void	 probecleanup(struct cam_periph *periph);
 static void	 xpt_find_quirk(struct cam_ed *device);
-#ifdef CAM_NEW_TRAN_CODE
 static void	 xpt_devise_transport(struct cam_path *path);
-#endif /* CAM_NEW_TRAN_CODE */
 static void	 xpt_set_transfer_settings(struct ccb_trans_settings *cts,
 					   struct cam_ed *device,
 					   int async_update);
@@ -1573,7 +1569,6 @@
 
 }
 
-#ifdef CAM_NEW_TRAN_CODE
 
 void
 xpt_announce_periph(struct cam_periph *periph, char *announce_string)
@@ -1708,113 +1703,6 @@
 		       periph->unit_number, announce_string);
 	splx(s);
 }
-#else /* CAM_NEW_TRAN_CODE */
-void
-xpt_announce_periph(struct cam_periph *periph, char *announce_string)
-{
-	int s;
-	u_int mb;
-	struct cam_path *path;
-	struct ccb_trans_settings cts;
-
-	GIANT_REQUIRED;
-
-	path = periph->path;
-	/*
-	 * To ensure that this is printed in one piece,
-	 * mask out CAM interrupts.
-	 */
-	s = splsoftcam();
-	printf("%s%d at %s%d bus %d target %d lun %d\n",
-	       periph->periph_name, periph->unit_number,
-	       path->bus->sim->sim_name,
-	       path->bus->sim->unit_number,
-	       path->bus->sim->bus_id,
-	       path->target->target_id,
-	       path->device->lun_id);
-	printf("%s%d: ", periph->periph_name, periph->unit_number);
-	scsi_print_inquiry(&path->device->inq_data);
-	if ((bootverbose)
-	 && (path->device->serial_num_len > 0)) {
-		/* Don't wrap the screen  - print only the first 60 chars */
-		printf("%s%d: Serial Number %.60s\n", periph->periph_name,
-		       periph->unit_number, path->device->serial_num);
-	}
-	xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
-	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
-	cts.flags = CCB_TRANS_CURRENT_SETTINGS;
-	xpt_action((union ccb*)&cts);
-	if (cts.ccb_h.status == CAM_REQ_CMP) {
-		u_int speed;
-		u_int freq;
-
-		if ((cts.valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0
-		  && cts.sync_offset != 0) {
-			freq = scsi_calc_syncsrate(cts.sync_period);
-			speed = freq;
-		} else {
-			struct ccb_pathinq cpi;
-
-			/* Ask the SIM for its base transfer speed */
-			xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
-			cpi.ccb_h.func_code = XPT_PATH_INQ;
-			xpt_action((union ccb *)&cpi);
-
-			speed = cpi.base_transfer_speed;
-			freq = 0;
-		}
-		if ((cts.valid & CCB_TRANS_BUS_WIDTH_VALID) != 0)
-			speed *= (0x01 << cts.bus_width);
-		mb = speed / 1000;
-		if (mb > 0)
-			printf("%s%d: %d.%03dMB/s transfers",
-			       periph->periph_name, periph->unit_number,
-			       mb, speed % 1000);
-		else
-			printf("%s%d: %dKB/s transfers", periph->periph_name,
-			       periph->unit_number, speed);
-		if ((cts.valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0
-		 && cts.sync_offset != 0) {
-			printf(" (%d.%03dMHz, offset %d", freq / 1000,
-			       freq % 1000, cts.sync_offset);
-		}
-		if ((cts.valid & CCB_TRANS_BUS_WIDTH_VALID) != 0
-		 && cts.bus_width > 0) {
-			if ((cts.valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0
-			 && cts.sync_offset != 0) {
-				printf(", ");
-			} else {
-				printf(" (");
-			}
-			printf("%dbit)", 8 * (0x01 << cts.bus_width));
-		} else if ((cts.valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0
-			&& cts.sync_offset != 0) {
-			printf(")");
-		}
-
-		if (path->device->inq_flags & SID_CmdQue
-		 || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) {
-			printf(", Tagged Queueing Enabled");
-		}
-
-		printf("\n");
-	} else if (path->device->inq_flags & SID_CmdQue
-   		|| path->device->flags & CAM_DEV_TAG_AFTER_COUNT) {
-		printf("%s%d: Tagged Queueing Enabled\n",
-		       periph->periph_name, periph->unit_number);
-	}
-
-	/*
-	 * We only want to print the caller's announce string if they've
-	 * passed one in..
-	 */
-	if (announce_string != NULL)
-		printf("%s%d: %s\n", periph->periph_name,
-		       periph->unit_number, announce_string);
-	splx(s);
-}
-
-#endif /* CAM_NEW_TRAN_CODE */
 
 static dev_match_ret
 xptbusmatch(struct dev_match_pattern *patterns, u_int num_patterns,
@@ -3028,9 +2916,7 @@
 	switch (start_ccb->ccb_h.func_code) {
 	case XPT_SCSI_IO:
 	{
-#ifdef CAM_NEW_TRAN_CODE
 		struct cam_ed *device;
-#endif /* CAM_NEW_TRAN_CODE */
 #ifdef CAMDEBUG
 		char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
 		struct cam_path *path;
@@ -3054,12 +2940,8 @@
 		 * This means that this code will be exercised while probing
 		 * devices with an ANSI revision greater than 2.
 		 */
-#ifdef CAM_NEW_TRAN_CODE
 		device = start_ccb->ccb_h.path->device;
 		if (device->protocol_version <= SCSI_REV_2
-#else /* CAM_NEW_TRAN_CODE */
-		if (SID_ANSI_REV(&start_ccb->ccb_h.path->device->inq_data) <= 2
-#endif /* CAM_NEW_TRAN_CODE */
 		 && start_ccb->ccb_h.target_lun < 8
 		 && (start_ccb->ccb_h.flags & CAM_CDB_POINTER) == 0) {
 
@@ -5112,9 +4994,7 @@
 static struct cam_ed *
 xpt_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
 {
-#ifdef CAM_NEW_TRAN_CODE
 	struct	   cam_path path;
-#endif /* CAM_NEW_TRAN_CODE */
 	struct	   cam_ed *device;
 	struct	   cam_devq *devq;
 	cam_status status;
@@ -5195,7 +5075,6 @@
 			TAILQ_INSERT_TAIL(&target->ed_entries, device, links);
 		}
 		target->generation++;
-#ifdef CAM_NEW_TRAN_CODE
 		if (lun_id != CAM_LUN_WILDCARD) {
 			xpt_compile_path(&path,
 					 NULL,
@@ -5205,7 +5084,6 @@
 			xpt_devise_transport(&path);
 			xpt_release_path(&path);
 		}
-#endif /* CAM_NEW_TRAN_CODE */
 	}
 	return (device);
 }
@@ -5955,19 +5833,10 @@
 
 	xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
 	cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
-#ifdef CAM_NEW_TRAN_CODE
 	cts.type = CTS_TYPE_USER_SETTINGS;
-#else /* CAM_NEW_TRAN_CODE */
-	cts.flags = CCB_TRANS_USER_SETTINGS;
-#endif /* CAM_NEW_TRAN_CODE */
 	xpt_action((union ccb *)&cts);
 	cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
-#ifdef CAM_NEW_TRAN_CODE
 	cts.type = CTS_TYPE_CURRENT_SETTINGS;
-#else /* CAM_NEW_TRAN_CODE */
-	cts.flags &= ~CCB_TRANS_USER_SETTINGS;
-	cts.flags |= CCB_TRANS_CURRENT_SETTINGS;
-#endif /* CAM_NEW_TRAN_CODE */
 	xpt_action((union ccb *)&cts);
 }
 
@@ -6043,9 +5912,7 @@
 
 				xpt_find_quirk(path->device);
 
-#ifdef CAM_NEW_TRAN_CODE
 				xpt_devise_transport(path);
-#endif /* CAM_NEW_TRAN_CODE */
 				if (INQ_DATA_TQ_ENABLED(inq_buf))
 					softc->action = PROBE_MODE_SENSE;
 				else
@@ -6298,7 +6165,6 @@
 	}
 }
 
-#ifdef CAM_NEW_TRAN_CODE
 
 static void
 xpt_devise_transport(struct cam_path *path)
@@ -6668,196 +6534,8 @@
 		(*(sim->sim_action))(sim, (union ccb *)cts);
 }
 
-#else /* CAM_NEW_TRAN_CODE */
 
 static void
-xpt_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device,
-			  int async_update)
-{
-	struct	cam_sim *sim;
-	int	qfrozen;
-
-	sim = cts->ccb_h.path->bus->sim;
-	if (async_update == FALSE) {
-		struct	scsi_inquiry_data *inq_data;
-		struct	ccb_pathinq cpi;
-		struct	ccb_trans_settings cur_cts;
-
-		if (device == NULL) {
-			cts->ccb_h.status = CAM_PATH_INVALID;
-			xpt_done((union ccb *)cts);
-			return;
-		}
-
-		/*
-		 * Perform sanity checking against what the
-		 * controller and device can do.
-		 */
-		xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, /*priority*/1);
-		cpi.ccb_h.func_code = XPT_PATH_INQ;
-		xpt_action((union ccb *)&cpi);
-		xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, /*priority*/1);
-		cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
-		cur_cts.flags = CCB_TRANS_CURRENT_SETTINGS;
-		xpt_action((union ccb *)&cur_cts);
-		inq_data = &device->inq_data;
-
-		/* Fill in any gaps in what the user gave us */
-		if ((cts->valid & CCB_TRANS_SYNC_RATE_VALID) == 0)
-			cts->sync_period = cur_cts.sync_period;
-		if ((cts->valid & CCB_TRANS_SYNC_OFFSET_VALID) == 0)
-			cts->sync_offset = cur_cts.sync_offset;
-		if ((cts->valid & CCB_TRANS_BUS_WIDTH_VALID) == 0)
-			cts->bus_width = cur_cts.bus_width;
-		if ((cts->valid & CCB_TRANS_DISC_VALID) == 0) {
-			cts->flags &= ~CCB_TRANS_DISC_ENB;
-			cts->flags |= cur_cts.flags & CCB_TRANS_DISC_ENB;
-		}
-		if ((cts->valid & CCB_TRANS_TQ_VALID) == 0) {
-			cts->flags &= ~CCB_TRANS_TAG_ENB;
-			cts->flags |= cur_cts.flags & CCB_TRANS_TAG_ENB;
-		}
-
-		if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
-		  && (inq_data->flags & SID_Sync) == 0)
-		 || ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0)
-		 || (cts->sync_offset == 0)
-		 || (cts->sync_period == 0)) {
-			/* Force async */
-			cts->sync_period = 0;
-			cts->sync_offset = 0;
-		} else if ((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
-			&& (inq_data->spi3data & SID_SPI_CLOCK_DT) == 0
-			&& cts->sync_period <= 0x9) {
-			/*
-			 * Don't allow DT transmission rates if the
-			 * device does not support it.
-			 */
-			cts->sync_period = 0xa;
-		}
-
-		switch (cts->bus_width) {
-		case MSG_EXT_WDTR_BUS_32_BIT:
-			if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) == 0
-			  || (inq_data->flags & SID_WBus32) != 0)
-			 && (cpi.hba_inquiry & PI_WIDE_32) != 0)
-				break;
-			/* FALLTHROUGH to 16-bit */
-		case MSG_EXT_WDTR_BUS_16_BIT:
-			if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) == 0
-			  || (inq_data->flags & SID_WBus16) != 0)
-			 && (cpi.hba_inquiry & PI_WIDE_16) != 0) {
-				cts->bus_width = MSG_EXT_WDTR_BUS_16_BIT;
-				break;
-			}
-			/* FALLTHROUGH to 8-bit */
-		default: /* New bus width?? */
-		case MSG_EXT_WDTR_BUS_8_BIT:
-			/* All targets can do this */
-			cts->bus_width = MSG_EXT_WDTR_BUS_8_BIT;
-			break;
-		}
-
-		if ((cts->flags & CCB_TRANS_DISC_ENB) == 0) {
-			/*
-			 * Can't tag queue without disconnection.
-			 */
-			cts->flags &= ~CCB_TRANS_TAG_ENB;
-			cts->valid |= CCB_TRANS_TQ_VALID;
-		}
-
-		if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0
-	 	 || (INQ_DATA_TQ_ENABLED(inq_data)) == 0
-		 || (device->queue_flags & SCP_QUEUE_DQUE) != 0
-		 || (device->quirk->mintags == 0)) {
-			/*
-			 * Can't tag on hardware that doesn't support,
-			 * doesn't have it enabled, or has broken tag support.
-			 */
-			cts->flags &= ~CCB_TRANS_TAG_ENB;
-		}
-	}
-
-	qfrozen = FALSE;
-	if ((cts->valid & CCB_TRANS_TQ_VALID) != 0) {
-		int device_tagenb;
-
-		/*
-		 * If we are transitioning from tags to no-tags or
-		 * vice-versa, we need to carefully freeze and restart
-		 * the queue so that we don't overlap tagged and non-tagged
-		 * commands.  We also temporarily stop tags if there is
-		 * a change in transfer negotiation settings to allow
-		 * "tag-less" negotiation.
-		 */
-		if ((device->flags & CAM_DEV_TAG_AFTER_COUNT) != 0
-		 || (device->inq_flags & SID_CmdQue) != 0)
-			device_tagenb = TRUE;
-		else
-			device_tagenb = FALSE;
-
-		if (((cts->flags & CCB_TRANS_TAG_ENB) != 0
-		  && device_tagenb == FALSE)
-		 || ((cts->flags & CCB_TRANS_TAG_ENB) == 0
-		  && device_tagenb == TRUE)) {
-
-			if ((cts->flags & CCB_TRANS_TAG_ENB) != 0) {
-				/*
-				 * Delay change to use tags until after a
-				 * few commands have gone to this device so
-				 * the controller has time to perform transfer
-				 * negotiations without tagged messages getting
-				 * in the way.
-				 */
-				device->tag_delay_count = CAM_TAG_DELAY_COUNT;
-				device->flags |= CAM_DEV_TAG_AFTER_COUNT;
-			} else {
-				xpt_freeze_devq(cts->ccb_h.path, /*count*/1);
-				qfrozen = TRUE;
-		  		device->inq_flags &= ~SID_CmdQue;
-				xpt_dev_ccbq_resize(cts->ccb_h.path,
-						    sim->max_dev_openings);
-				device->flags &= ~CAM_DEV_TAG_AFTER_COUNT;
-				device->tag_delay_count = 0;
-			}
-		}
-	}
-
-	if (async_update == FALSE) {
-		/*
-		 * If we are currently performing tagged transactions to
-		 * this device and want to change its negotiation parameters,
-		 * go non-tagged for a bit to give the controller a chance to
-		 * negotiate unhampered by tag messages.
-		 */
-		if ((device->inq_flags & SID_CmdQue) != 0
-		 && (cts->flags & (CCB_TRANS_SYNC_RATE_VALID|
-				   CCB_TRANS_SYNC_OFFSET_VALID|
-				   CCB_TRANS_BUS_WIDTH_VALID)) != 0)
-			xpt_toggle_tags(cts->ccb_h.path);
-
-		(*(sim->sim_action))(sim, (union ccb *)cts);
-	}
-
-	if (qfrozen) {
-		struct ccb_relsim crs;
-
-		xpt_setup_ccb(&crs.ccb_h, cts->ccb_h.path,
-			      /*priority*/1);
-		crs.ccb_h.func_code = XPT_REL_SIMQ;
-		crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
-		crs.openings
-		    = crs.release_timeout 
-		    = crs.qfrozen_cnt
-		    = 0;
-		xpt_action((union ccb *)&crs);
-	}
-}
-
-
-#endif /* CAM_NEW_TRAN_CODE */
-
-static void
 xpt_toggle_tags(struct cam_path *path)
 {
 	struct cam_ed *dev;
@@ -6876,24 +6554,15 @@
 		struct ccb_trans_settings cts;
 
 		xpt_setup_ccb(&cts.ccb_h, path, 1);
-#ifdef CAM_NEW_TRAN_CODE
 		cts.protocol = PROTO_SCSI;
 		cts.protocol_version = PROTO_VERSION_UNSPECIFIED;
 		cts.transport = XPORT_UNSPECIFIED;
 		cts.transport_version = XPORT_VERSION_UNSPECIFIED;
 		cts.proto_specific.scsi.flags = 0;
 		cts.proto_specific.scsi.valid = CTS_SCSI_VALID_TQ;
-#else /* CAM_NEW_TRAN_CODE */
-		cts.flags = 0;
-		cts.valid = CCB_TRANS_TQ_VALID;
-#endif /* CAM_NEW_TRAN_CODE */
 		xpt_set_transfer_settings(&cts, path->device,
 					  /*async_update*/TRUE);
-#ifdef CAM_NEW_TRAN_CODE
 		cts.proto_specific.scsi.flags = CTS_SCSI_FLAGS_TAG_ENB;
-#else /* CAM_NEW_TRAN_CODE */
-		cts.flags = CCB_TRANS_TAG_ENB;
-#endif /* CAM_NEW_TRAN_CODE */
 		xpt_set_transfer_settings(&cts, path->device,
 					  /*async_update*/TRUE);
 	}
@@ -7157,12 +6826,10 @@
 		cpi->unit_number = sim->unit_number;
 		cpi->bus_id = sim->bus_id;
 		cpi->base_transfer_speed = 0;
-#ifdef CAM_NEW_TRAN_CODE
 		cpi->protocol = PROTO_UNSPECIFIED;
 		cpi->protocol_version = PROTO_VERSION_UNSPECIFIED;
 		cpi->transport = XPORT_UNSPECIFIED;
 		cpi->transport_version = XPORT_VERSION_UNSPECIFIED;
-#endif /* CAM_NEW_TRAN_CODE */
 		cpi->ccb_h.status = CAM_REQ_CMP;
 		xpt_done(work_ccb);
 		break;

==== //depot/projects/ia64/sys/cam/scsi/scsi_low.c#17 (text+ko) ====

@@ -2,7 +2,7 @@
 /*	$NetBSD$	*/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_low.c,v 1.25 2006/10/31 05:53:24 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_low.c,v 1.26 2006/11/02 00:54:33 mjacob Exp $");
 
 #define	SCSI_LOW_STATICS
 #define	SCSI_LOW_DEBUG
@@ -1084,10 +1084,8 @@
 		break;
 
 	case XPT_SET_TRAN_SETTINGS: {
-#ifdef	CAM_NEW_TRAN_CODE
 		struct ccb_trans_settings_scsi *scsi;
         	struct ccb_trans_settings_spi *spi;
-#endif
 		struct ccb_trans_settings *cts;
 		u_int val;
 
@@ -1106,57 +1104,6 @@
 			lun = 0;
 
 		s = SCSI_LOW_SPLSCSI();
-#ifndef	CAM_NEW_TRAN_CODE
-		if ((cts->valid & (CCB_TRANS_BUS_WIDTH_VALID |
-				   CCB_TRANS_SYNC_RATE_VALID |
-				   CCB_TRANS_SYNC_OFFSET_VALID)) != 0)
-		{
-			if ((cts->valid & CCB_TRANS_BUS_WIDTH_VALID) != 0) {
-				val = cts->bus_width;
-				if (val < ti->ti_width)
-					ti->ti_width = val;
-			}
-			if ((cts->valid & CCB_TRANS_SYNC_RATE_VALID) != 0) {
-				val = cts->sync_period;
-				if (val == 0 || val > ti->ti_maxsynch.period)
-					ti->ti_maxsynch.period = val;
-			}
-			if ((cts->valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0) {
-				val = cts->sync_offset;
-				if (val < ti->ti_maxsynch.offset)
-					ti->ti_maxsynch.offset = val;
-			}
-
-			ti->ti_flags_valid |= SCSI_LOW_TARG_FLAGS_QUIRKS_VALID;
-			scsi_low_calcf_target(ti);
-		}
-
-		if ((cts->valid & (CCB_TRANS_DISC_VALID |
-				   CCB_TRANS_TQ_VALID)) != 0)
-		{
-			li = scsi_low_alloc_li(ti, lun, 1);
-			if ((cts->valid & CCB_TRANS_DISC_VALID) != 0)
-			{
-				if ((cts->flags & CCB_TRANS_DISC_ENB) != 0)
-					li->li_quirks |= SCSI_LOW_DISK_DISC;
-				else
-					li->li_quirks &= ~SCSI_LOW_DISK_DISC;
-			}
-			if ((cts->valid & CCB_TRANS_TQ_VALID) != 0)
-			{
-				if ((cts->flags & CCB_TRANS_TAG_ENB) != 0)
-					li->li_quirks |= SCSI_LOW_DISK_QTAG;
-				else
-					li->li_quirks &= ~SCSI_LOW_DISK_QTAG;
-			}
-
-			li->li_flags_valid |= SCSI_LOW_LUN_FLAGS_QUIRKS_VALID;
-			scsi_low_calcf_target(ti);
-			scsi_low_calcf_lun(li);
-			if ((slp->sl_show_result & SHOW_CALCF_RES) != 0)
-				scsi_low_calcf_show(li);
-		}
-#else
 		scsi = &cts->proto_specific.scsi;
 		spi = &cts->xport_specific.spi;
 		if ((spi->valid & (CTS_SPI_VALID_BUS_WIDTH |
@@ -1203,7 +1150,6 @@
 			if ((slp->sl_show_result & SHOW_CALCF_RES) != 0)
 				scsi_low_calcf_show(li);
 		}
-#endif
 		splx(s);
 
 		ccb->ccb_h.status = CAM_REQ_CMP;
@@ -1231,7 +1177,6 @@
 
 		s = SCSI_LOW_SPLSCSI();
 		li = scsi_low_alloc_li(ti, lun, 1);
-#ifdef CAM_NEW_TRAN_CODE
 		if (li != NULL && cts->type == CTS_TYPE_CURRENT_SETTINGS) {
 			struct ccb_trans_settings_scsi *scsi =
 				&cts->proto_specific.scsi;
@@ -1275,65 +1220,6 @@
 				scsi->valid = 0;
 		} else
 			ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-#else
- 		if ((cts->flags & CCB_TRANS_USER_SETTINGS) != 0)
- 		{
-#ifdef	SCSI_LOW_DIAGNOSTIC
-			if ((li->li_flags_valid & SCSI_LOW_LUN_FLAGS_DISK_VALID) == 0)
-			{
-				ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-				printf("%s: invalid GET_TRANS_USER_SETTINGS call\n",
-					slp->sl_xname);
-				goto settings_out;
-			}
-#endif	/* SCSI_LOW_DIAGNOSTIC */
-			diskflags = li->li_diskflags & li->li_cfgflags;
-			if ((diskflags & SCSI_LOW_DISK_DISC) != 0)
-				cts->flags |= CCB_TRANS_DISC_ENB;
-			else
-				cts->flags &= ~CCB_TRANS_DISC_ENB;
-			if ((diskflags & SCSI_LOW_DISK_QTAG) != 0)
-				cts->flags |= CCB_TRANS_TAG_ENB;
-			else
-				cts->flags &= ~CCB_TRANS_TAG_ENB;
-		}
-		else if ((cts->flags & CCB_TRANS_CURRENT_SETTINGS) != 0)
-		{
-#ifdef	SCSI_LOW_DIAGNOSTIC
-			if (li->li_flags_valid != SCSI_LOW_LUN_FLAGS_ALL_VALID)
-			{
-				ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-				printf("%s: invalid GET_TRANS_CURRENT_SETTINGS call\n",
-					slp->sl_xname);
-				goto settings_out;
-			}
-#endif	/* SCSI_LOW_DIAGNOSTIC */
-			if ((li->li_flags & SCSI_LOW_DISC) != 0)
-				cts->flags |= CCB_TRANS_DISC_ENB;
-			else
-				cts->flags &= ~CCB_TRANS_DISC_ENB;
-			if ((li->li_flags & SCSI_LOW_QTAG) != 0)
-				cts->flags |= CCB_TRANS_TAG_ENB;
-			else
-				cts->flags &= ~CCB_TRANS_TAG_ENB;
-		}
-		else
-		{
-			ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-			goto settings_out;
-		}
-
-		cts->sync_period = ti->ti_maxsynch.period;
-		cts->sync_offset = ti->ti_maxsynch.offset;
-		cts->bus_width = ti->ti_width;
-
-		cts->valid = CCB_TRANS_SYNC_RATE_VALID
-			   | CCB_TRANS_SYNC_OFFSET_VALID
-			   | CCB_TRANS_BUS_WIDTH_VALID
-			   | CCB_TRANS_DISC_VALID
-			   | CCB_TRANS_TQ_VALID;
-		ccb->ccb_h.status = CAM_REQ_CMP;
-#endif
 settings_out:
 		splx(s);
 		xpt_done(ccb);
@@ -1414,12 +1300,10 @@
 		cpi->initiator_id = slp->sl_hostid;
 		cpi->bus_id = cam_sim_bus(sim);
 		cpi->base_transfer_speed = 3300;
-#ifdef CAM_NEW_TRAN_CODE
 		cpi->transport = XPORT_SPI;
 		cpi->transport_version = 2;
 		cpi->protocol = PROTO_SCSI;
 		cpi->protocol_version = SCSI_REV_2;
-#endif
 		strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
 		strncpy(cpi->hba_vid, "SCSI_LOW", HBA_IDLEN);
 		strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);

==== //depot/projects/ia64/sys/conf/NOTES#108 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1395 2006/10/31 22:22:29 pjd Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1396 2006/11/02 00:54:33 mjacob Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -1137,8 +1137,6 @@
 #                   CAM_DEBUG_SUBTRACE, and CAM_DEBUG_CDB
 #
 # CAM_MAX_HIGHPOWER: Maximum number of concurrent high power (start unit) cmds
-# CAM_NEW_TRAN_CODE: this is the new transport layer code that will be switched
-#			to soon
 # SCSI_NO_SENSE_STRINGS: When defined disables sense descriptions
 # SCSI_NO_OP_STRINGS: When defined disables opcode descriptions
 # SCSI_DELAY: The number of MILLISECONDS to freeze the SIM (scsi adapter)

==== //depot/projects/ia64/sys/conf/options#99 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.561 2006/10/31 22:22:29 pjd Exp $
+# $FreeBSD: src/sys/conf/options,v 1.562 2006/11/02 00:54:33 mjacob Exp $
 #
 #        On the handling of kernel options

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



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