--- old/usr/src/lib/cfgadm_plugins/fp/common/cfga_utils.c	Tue Sep 25 07:16:30 2012
+++ new/usr/src/lib/cfgadm_plugins/fp/common/cfga_utils.c	Tue Sep 25 07:16:30 2012
@@ -137,7 +137,7 @@
 {ERR_MATCHING_HBA_PORT,	0, 1,
 			"No match HBA port found"},
 {ERR_NO_ADAPTER_FOUND,	0, 1,
-			"No Fibre Channel adpaters found"},
+			"No Fibre Channel adapters found"},
 
 /* Errors with arguments */
 {ERRARG_OPT_INVAL,	1, 1,	"invalid option: "},
@@ -442,7 +442,7 @@
 	/* Get the path of dynamic attachment point if already configured. */
 	if (dyncomp != NULL) {
 		ret = dyn_apid_to_path(xport_phys, dyncomp,
-				&lunlistp, &l_errno);
+		    &lunlistp, &l_errno);
 		if ((ret != FPCFGA_OK) && (ret != FPCFGA_APID_NOCONFIGURE)) {
 			cfga_err(errstring, l_errno, ERR_OP_FAILED, 0);
 			goto err;
@@ -564,7 +564,7 @@
 	while (fpnode) {
 		devfs_fp_path = di_devfs_path(fpnode);
 		if ((devfs_fp_path) && !(strncmp(devfs_fp_path,
-				root_path, strlen(root_path)))) {
+		    root_path, strlen(root_path)))) {
 			found = 1;
 			di_devfs_path_free(devfs_fp_path);
 			break;
@@ -587,7 +587,7 @@
 	} else {
 		assert(cmd == FPCFGA_WALK_MINOR);
 		rv = di_walk_minor(root, up->walkmode.minor_args.nodetype, 0,
-			arg, up->walkmode.minor_args.fcn);
+		    arg, up->walkmode.minor_args.fcn);
 	}
 
 	if (rv != 0) {
@@ -671,7 +671,7 @@
 	 * So, concatenate the old and new strings
 	 */
 	if ((tmp_str = calloc(1,
-		strlen(*errstring) + strlen(tmp_err_str) + 2)) == NULL) {
+	    strlen(*errstring) + strlen(tmp_err_str) + 2)) == NULL) {
 		/* In case of error, retain only the earlier message */
 		free(tmp_err_str);
 		return;
@@ -928,7 +928,7 @@
 	 * offline.
 	 */
 	if ((state & DI_DEVICE_OFFLINE) == DI_DEVICE_OFFLINE ||
-		(state & DI_DRIVER_DETACHED) != DI_DRIVER_DETACHED) {
+	    (state & DI_DRIVER_DETACHED) != DI_DRIVER_DETACHED) {
 		return (1);
 	}
 
@@ -1118,8 +1118,8 @@
 
 	/* Loop as long as we have a retryable error */
 	while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
-		status == HBA_STATUS_ERROR_BUSY) &&
-		count++ < HBA_MAX_RETRIES) {
+	    status == HBA_STATUS_ERROR_BUSY) &&
+	    count++ < HBA_MAX_RETRIES) {
 		status = HBA_GetAdapterAttributes(handle, attrs);
 		if (status == HBA_STATUS_OK) {
 			break;
@@ -1141,11 +1141,11 @@
 
 	/* Loop as long as we have a retryable error */
 	while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
-		status == HBA_STATUS_ERROR_BUSY) &&
-		count++ < HBA_MAX_RETRIES) {
+	    status == HBA_STATUS_ERROR_BUSY) &&
+	    count++ < HBA_MAX_RETRIES) {
 		status = HBA_GetPortAttributesByWWN(handle, wwn, attrs);
 		if (status == HBA_STATUS_OK) {
-		    break;
+			break;
 		}
 
 		/* The odds of this occuring are very slim, but possible. */
@@ -1175,8 +1175,8 @@
 
 	/* Loop as long as we have a retryable error */
 	while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
-		status == HBA_STATUS_ERROR_BUSY) &&
-		count++ < HBA_MAX_RETRIES) {
+	    status == HBA_STATUS_ERROR_BUSY) &&
+	    count++ < HBA_MAX_RETRIES) {
 		status = HBA_GetAdapterPortAttributes(handle, portIndex, attrs);
 		if (status == HBA_STATUS_OK) {
 			break;
@@ -1209,10 +1209,10 @@
 
 	/* Loop as long as we have a retryable error */
 	while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
-		status == HBA_STATUS_ERROR_BUSY) &&
-		count++ < HBA_MAX_RETRIES) {
+	    status == HBA_STATUS_ERROR_BUSY) &&
+	    count++ < HBA_MAX_RETRIES) {
 		status = HBA_GetDiscoveredPortAttributes(handle, portIndex,
-				discIndex, attrs);
+		    discIndex, attrs);
 		if (status == HBA_STATUS_OK) {
 			break;
 		}
@@ -1253,119 +1253,135 @@
 
 	status = HBA_LoadLibrary();
 	if (status != HBA_STATUS_OK) {
-	    cfga_err(errstring, 0, ERR_HBA_LOAD_LIBRARY, 0);
-	    return (FPCFGA_LIB_ERR);
+		cfga_err(errstring, 0, ERR_HBA_LOAD_LIBRARY, 0);
+		return (FPCFGA_LIB_ERR);
 	}
 	count = HBA_GetNumberOfAdapters();
 	if (count == 0) {
-	    cfga_err(errstring, 0, ERR_NO_ADAPTER_FOUND, 0);
-	    HBA_FreeLibrary();
-	    return (FPCFGA_LIB_ERR);
+		cfga_err(errstring, 0, ERR_NO_ADAPTER_FOUND, 0);
+		HBA_FreeLibrary();
+		return (FPCFGA_LIB_ERR);
 	}
 
 	/* Loop over all HBAs */
 	for (adapterIndex = 0; adapterIndex < count; adapterIndex ++) {
-	    status = HBA_GetAdapterName(adapterIndex, (char *)&adapterName);
-	    if (status != HBA_STATUS_OK) {
-		/* May have been DR'd */
-		continue;
-	    }
-	    handle = HBA_OpenAdapter(adapterName);
-	    if (handle == 0) {
-		/* May have been DR'd */
-		continue;
-	    }
-
-	    do {
-		if (getAdapterAttrs(handle, &hbaAttrs)) {
-		/* Should never happen */
-		    HBA_CloseAdapter(handle);
-		    continue;
+		status = HBA_GetAdapterName(adapterIndex, (char *)&adapterName);
+		if (status != HBA_STATUS_OK) {
+			/* May have been DR'd */
+			continue;
 		}
+		handle = HBA_OpenAdapter(adapterName);
+		if (handle == 0) {
+			/* May have been DR'd */
+			continue;
+		}
 
-		/* Loop over all HBA Ports */
-		for (portIndex = 0;
-		    portIndex < hbaAttrs.NumberOfPorts; portIndex++) {
-		    if ((status = getAdapterPortAttrs(handle, portIndex,
-			&portAttrs)) != HBA_STATUS_OK) {
-			/* Need to refresh adapter */
-			if (status == HBA_STATUS_ERROR_STALE_DATA) {
-			    HBA_RefreshInformation(handle);
-			    break;
-			} else {
-			    continue;
+		do {
+			if (getAdapterAttrs(handle, &hbaAttrs)) {
+				/* Should never happen */
+				HBA_CloseAdapter(handle);
+				continue;
 			}
-		    }
 
-			/*
-			 * check to see if OSDeviceName is a /dev/cfg link
-			 * or the physical path
-			 */
-		    if (strncmp(portAttrs.OSDeviceName, CFGA_DEV_DIR,
-			strlen(CFGA_DEV_DIR)) != 0) {
-			tmpPtr = strstr(portAttrs.OSDeviceName, MINOR_SEP);
-			if (tmpPtr != NULL) {
-				if (strncmp(portPath,
+			/* Loop over all HBA Ports */
+			for (portIndex = 0;
+			    portIndex < hbaAttrs.NumberOfPorts; portIndex++) {
+				if ((status = getAdapterPortAttrs(handle,
+				    portIndex,
+				    &portAttrs)) != HBA_STATUS_OK) {
+					/* Need to refresh adapter */
+					if (status ==
+					    HBA_STATUS_ERROR_STALE_DATA) {
+						HBA_RefreshInformation(handle);
+						break;
+					} else {
+						continue;
+					}
+				}
+
+				/*
+				 * check to see if OSDeviceName is a /dev/cfg
+				 * link or the physical path
+				 */
+				if (strncmp(portAttrs.OSDeviceName,
+				    CFGA_DEV_DIR,
+				    strlen(CFGA_DEV_DIR)) != 0) {
+					tmpPtr = strstr(portAttrs.OSDeviceName,
+					    MINOR_SEP);
+					if ((tmpPtr != NULL) &&
+					    strncmp(portPath,
 					    portAttrs.OSDeviceName,
 					    strlen(portAttrs.OSDeviceName) -
 					    strlen(tmpPtr)) == 0) {
-					if (matchingHandle)
-						*matchingHandle = handle;
-					if (matchingPortIndex)
-						*matchingPortIndex = portIndex;
-					if (matchingPortAttrs)
-						*matchingPortAttrs = portAttrs;
-					return (FPCFGA_OK);
+						if (matchingHandle)
+							*matchingHandle =
+							    handle;
+						if (matchingPortIndex)
+							*matchingPortIndex =
+							    portIndex;
+						if (matchingPortAttrs)
+							*matchingPortAttrs =
+							    portAttrs;
+						return (FPCFGA_OK);
+					}
+				} else {
+					/*
+					 * strip off the /dev/cfg/ portion of
+					 * the OSDeviceName make sure that the
+					 * OSDeviceName is at least
+					 * strlen("/dev/cfg") + 1 + 1 long.
+					 * first 1 is for the / after /dev/cfg
+					 * second 1 is to make sure there is
+					 * somthing after
+					 */
+					if (strlen(portAttrs.OSDeviceName) <
+					    (strlen(CFGA_DEV_DIR) + 1 + 1))
+						continue;
+					cfg_ptr = portAttrs.OSDeviceName +
+					    strlen(CFGA_DEV_DIR) + 1;
+					if (logical_apid == NULL) {
+						/*
+						 * get the /dev/cfg link from
+						 * the portPath
+						 */
+						if (make_xport_logid(portPath,
+						    &logical_apid,
+						    &l_errno) != FPCFGA_OK) {
+							cfga_err(errstring,
+							    l_errno,
+							    ERR_LIST, 0);
+							HBA_FreeLibrary();
+							return
+							    (FPCFGA_LIB_ERR);
+						}
+					}
+					/* compare logical ap_id */
+					if (strcmp(logical_apid,
+					    cfg_ptr) == 0) {
+						if (matchingHandle)
+							*matchingHandle =
+							    handle;
+						if (matchingPortIndex)
+							*matchingPortIndex =
+							    portIndex;
+						if (matchingPortAttrs)
+							*matchingPortAttrs =
+							    portAttrs;
+						S_FREE(logical_apid);
+						return (FPCFGA_OK);
+					}
 				}
 			}
-		    } else {
-			/*
-			 * strip off the /dev/cfg/ portion of the
-			 * OSDeviceName
-			 * make sure that the OSDeviceName is at least
-			 * strlen("/dev/cfg") + 1 + 1 long.
-			 *	first 1 is for the / after /dev/cfg
-			 *	second 1 is to make sure there is somthing
-			 *	after
-			 */
-			if (strlen(portAttrs.OSDeviceName) <
-			    (strlen(CFGA_DEV_DIR) + 1 + 1))
-				continue;
-			cfg_ptr = portAttrs.OSDeviceName +
-			    strlen(CFGA_DEV_DIR) + 1;
-			if (logical_apid == NULL) {
-				/* get the /dev/cfg link from the portPath */
-				if (make_xport_logid(portPath, &logical_apid,
-					    &l_errno) != FPCFGA_OK) {
-					cfga_err(errstring, l_errno,
-					    ERR_LIST, 0);
-					HBA_FreeLibrary();
-					return (FPCFGA_LIB_ERR);
-				}
-			}
-			/* compare logical ap_id */
-			if (strcmp(logical_apid, cfg_ptr) == 0) {
-				if (matchingHandle)
-					*matchingHandle = handle;
-				if (matchingPortIndex)
-					*matchingPortIndex = portIndex;
-				if (matchingPortAttrs)
-					*matchingPortAttrs = portAttrs;
+			if (logical_apid != NULL)
 				S_FREE(logical_apid);
-				return (FPCFGA_OK);
-			}
-		    }
-		}
-		if (logical_apid != NULL)
-			S_FREE(logical_apid);
-	    } while ((status == HBA_STATUS_ERROR_STALE_DATA) &&
-		(retry++ < HBA_MAX_RETRIES));
+		} while ((status == HBA_STATUS_ERROR_STALE_DATA) &&
+		    (retry++ < HBA_MAX_RETRIES));
 
-	    HBA_CloseAdapter(handle);
+		HBA_CloseAdapter(handle);
 	}
 	free(logical_apid);
 
-	/* Got here. No mathcing adatper port found. */
+	/* Got here. No matching adapter port found. */
 	cfga_err(errstring, 0, ERR_MATCHING_HBA_PORT, 0);
 	HBA_FreeLibrary();
 	return (FPCFGA_LIB_ERR);
--- old/usr/src/lib/smhba/common/SMHBAAPILIB.c	Tue Sep 25 07:16:31 2012
+++ new/usr/src/lib/smhba/common/SMHBAAPILIB.c	Tue Sep 25 07:16:30 2012
@@ -1403,7 +1403,7 @@
 	HBA_STATUS		ret = HBA_STATUS_ERROR_ILLEGAL_INDEX;
 
 	if (adaptername == NULL) {
-		DEBUG(1, "HBA_GetAdapterName: NULL pointer adatpername",
+		DEBUG(1, "HBA_GetAdapterName: NULL pointer adaptername",
 		    0, 0, 0);
 		return (HBA_STATUS_ERROR_ARG);
 	}
@@ -1451,7 +1451,7 @@
 		return (handle);
 	}
 	if (adaptername == NULL) {
-		DEBUG(1, "HBA_OpenAdapter: NULL pointer adatpername",
+		DEBUG(1, "HBA_OpenAdapter: NULL pointer adaptername",
 		    0, 0, 0);
 		return (handle);
 	}
@@ -4329,7 +4329,7 @@
  * Following the similar logic of HBAAPI addaspterevents_callback.
  *
  * Unlike other events Adapter Add Event is not limited to a specific
- * adpater(i.e. no adatper handle is passed for registration) so
+ * adapter(i.e. no adapter handle is passed for registration) so
  * the event should be passed to all registrants.  The routine below
  * is passed to the VSLs as a callback and when Adapter Add event is detected
  * by VSL it will call smhba_adapteraddevents_callback() which in turn check
--- old/usr/src/lib/sun_fc/common/FCHBA.cc	Tue Sep 25 07:16:32 2012
+++ new/usr/src/lib/sun_fc/common/FCHBA.cc	Tue Sep 25 07:16:31 2012
@@ -447,7 +447,7 @@
     if (pathList->numAdapters > HBAList::HBA_MAX_PER_LIST) {
 	delete(pathList);
 	throw InternalError(
-	    "Exceeds max number of adatpers that VSL supports.");
+	    "Exceeds max number of adapters that VSL supports.");
     }
     delete (pathList);
 }
--- old/usr/src/lib/sun_fc/common/TgtFCHBA.cc	Tue Sep 25 07:16:32 2012
+++ new/usr/src/lib/sun_fc/common/TgtFCHBA.cc	Tue Sep 25 07:16:32 2012
@@ -330,7 +330,7 @@
     if (tgthbaList->numPorts > HBAList::HBA_MAX_PER_LIST) {
 	delete(tgthbaList);
 	throw InternalError(
-	    "Exceeds max number of adatpers that VSL supports.");
+	    "Exceeds max number of adapters that VSL supports.");
     }
     delete (tgthbaList);
 }
--- old/usr/src/lib/sun_sas/common/sun_sas.c	Tue Sep 25 07:16:33 2012
+++ new/usr/src/lib/sun_sas/common/sun_sas.c	Tue Sep 25 07:16:32 2012
@@ -133,7 +133,7 @@
 	struct open_handle	*open_handle_ptr = NULL;
 
 	if (global_hba_head == NULL) {
-		log(LOG_DEBUG, ROUTINE, "No adpater is found.");
+		log(LOG_DEBUG, ROUTINE, "No adapter is found.");
 		return (NULL);
 	}
 
--- old/usr/src/uts/common/io/1394/adapters/hci1394_extern.c	Tue Sep 25 07:16:33 2012
+++ new/usr/src/uts/common/io/1394/adapters/hci1394_extern.c	Tue Sep 25 07:16:33 2012
@@ -24,8 +24,6 @@
  * All rights reserved.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * hci1394_extern.c
  *    Central location for externs.  There are two exceptions to this,
@@ -52,7 +50,7 @@
 
 
 /*
- * 1394 address map for OpenHCI adpaters.
+ * 1394 address map for OpenHCI adapters.
  *
  * This is what is reported to the services layer.  The hci1394 driver does not
  * modify the HW to reflect this.  This should reflect what the OpenHCI 1.0 HW
--- old/usr/src/uts/common/io/igb/igb_regs.h	Tue Sep 25 07:16:34 2012
+++ new/usr/src/uts/common/io/igb/igb_regs.h	Tue Sep 25 07:16:34 2012
@@ -216,7 +216,7 @@
 /* Packet Buffer DWORD (_n) */
 #define	E1000_PBSLAD(_n)	(0x03110 + (0x4 * (_n)))
 #define	E1000_TXPBS	0x03404  /* Tx Packet Buffer Size - RW */
-/* Same as TXPBS, renamed for newer adpaters - RW */
+/* Same as TXPBS, renamed for newer adapters - RW */
 #define	E1000_ITPBS	0x03404
 #define	E1000_TDFH	0x03410  /* Tx Data FIFO Head - RW */
 #define	E1000_TDFT	0x03418  /* Tx Data FIFO Tail - RW */
--- old/usr/src/uts/common/io/ipw/ipw2100.c	Tue Sep 25 07:16:35 2012
+++ new/usr/src/uts/common/io/ipw/ipw2100.c	Tue Sep 25 07:16:34 2012
@@ -1273,7 +1273,7 @@
 	ipw2100_master_stop(sc);
 
 	/*
-	 * move adatper to DO state
+	 * move adapter to DO state
 	 */
 	tmp = ipw2100_csr_get32(sc, IPW2100_CSR_CTL);
 	ipw2100_csr_put32(sc, IPW2100_CSR_CTL, tmp | IPW2100_CTL_INIT);
--- old/usr/src/uts/common/io/iwi/ipw2200.h	Tue Sep 25 07:16:35 2012
+++ new/usr/src/uts/common/io/iwi/ipw2200.h	Tue Sep 25 07:16:35 2012
@@ -38,7 +38,7 @@
 #endif
 
 /*
- * Intel Wireless PRO/2200 mini-pci adpater drier
+ * Intel Wireless PRO/2200 mini-pci adapter drier
  * ipw2200.h: common definitions and interface to user land application
  */
 #include <sys/types.h>
