svn commit: r203885 - head/sys/dev/aac

Ed Maste emaste at FreeBSD.org
Sun Feb 14 17:14:12 UTC 2010


Author: emaste
Date: Sun Feb 14 17:14:11 2010
New Revision: 203885
URL: http://svn.freebsd.org/changeset/base/203885

Log:
  Diff reduction with Adaptec's vendor driver.
  
  Driver version 2.1.9 chosen as that Adaptec version roughly corresponds
  with the current feature set merged to the in-tree driver.

Modified:
  head/sys/dev/aac/aac.c
  head/sys/dev/aac/aac_cam.c
  head/sys/dev/aac/aacreg.h
  head/sys/dev/aac/aacvar.h

Modified: head/sys/dev/aac/aac.c
==============================================================================
--- head/sys/dev/aac/aac.c	Sun Feb 14 17:03:20 2010	(r203884)
+++ head/sys/dev/aac/aac.c	Sun Feb 14 17:14:11 2010	(r203885)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
 /*
  * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters.
  */
-#define AAC_DRIVER_VERSION		0x02000000
 #define AAC_DRIVERNAME			"aac"
 
 #include "opt_aac.h"
@@ -2767,10 +2766,8 @@ aac_describe_controller(struct aac_softc
 	}
 	device_printf(sc->aac_dev, "%s, aac driver %d.%d.%d-%d\n",
 		adapter_type,
-		AAC_DRIVER_VERSION >> 24,
-		(AAC_DRIVER_VERSION >> 16) & 0xFF,
-		AAC_DRIVER_VERSION & 0xFF,
-		AAC_DRIVER_BUILD);
+		AAC_DRIVER_MAJOR_VERSION, AAC_DRIVER_MINOR_VERSION,
+		AAC_DRIVER_BUGFIX_LEVEL, AAC_DRIVER_BUILD);
 
 	aac_release_sync_fib(sc);
 	mtx_unlock(&sc->aac_io_lock);
@@ -3255,10 +3252,16 @@ aac_rev_check(struct aac_softc *sc, cadd
 	 * Doctor up the response struct.
 	 */
 	rev_check_resp.possiblyCompatible = 1;
-	rev_check_resp.adapterSWRevision.external.ul =
-	    sc->aac_revision.external.ul;
+	rev_check_resp.adapterSWRevision.external.comp.major =
+	    AAC_DRIVER_MAJOR_VERSION;
+	rev_check_resp.adapterSWRevision.external.comp.minor =
+	    AAC_DRIVER_MINOR_VERSION;
+	rev_check_resp.adapterSWRevision.external.comp.type =
+	    AAC_DRIVER_TYPE;
+	rev_check_resp.adapterSWRevision.external.comp.dash =
+	    AAC_DRIVER_BUGFIX_LEVEL;
 	rev_check_resp.adapterSWRevision.buildNumber =
-	    sc->aac_revision.buildNumber;
+	    AAC_DRIVER_BUILD;
 
 	return(copyout((caddr_t)&rev_check_resp, udata,
 			sizeof(struct aac_rev_check_resp)));

Modified: head/sys/dev/aac/aac_cam.c
==============================================================================
--- head/sys/dev/aac/aac_cam.c	Sun Feb 14 17:03:20 2010	(r203884)
+++ head/sys/dev/aac/aac_cam.c	Sun Feb 14 17:14:11 2010	(r203885)
@@ -405,10 +405,10 @@ aac_cam_action(struct cam_sim *sim, unio
 				if (ccb->ccb_h.flags & CAM_DATA_PHYS) {
 					/* Send a 32bit command */
 					fib->Header.Command = ScsiPortCommand;
-					srb->sg_map32.SgCount = 1;
-					srb->sg_map32.SgEntry[0].SgAddress =
+					srb->sg_map.SgCount = 1;
+					srb->sg_map.SgEntry[0].SgAddress =
 					    (uint32_t)(uintptr_t)csio->data_ptr;
-					srb->sg_map32.SgEntry[0].SgByteCount =
+					srb->sg_map.SgEntry[0].SgByteCount =
 					    csio->dxfer_len;
 				} else {
 					/*
@@ -417,15 +417,15 @@ aac_cam_action(struct cam_sim *sim, unio
 					 */
 					cm->cm_data = (void *)csio->data_ptr;
 					cm->cm_datalen = csio->dxfer_len;
-					cm->cm_sgtable = &srb->sg_map32;
+					cm->cm_sgtable = &srb->sg_map;
 				}
 			} else {
 				/* XXX Need to handle multiple s/g elements */
 				panic("aac_cam: multiple s/g elements");
 			}
 		} else {
-			srb->sg_map32.SgCount = 0;
-			srb->sg_map32.SgEntry[0].SgByteCount = 0;
+			srb->sg_map.SgCount = 0;
+			srb->sg_map.SgEntry[0].SgByteCount = 0;
 			srb->data_len = 0;
 		}
 

Modified: head/sys/dev/aac/aacreg.h
==============================================================================
--- head/sys/dev/aac/aacreg.h	Sun Feb 14 17:03:20 2010	(r203884)
+++ head/sys/dev/aac/aacreg.h	Sun Feb 14 17:14:11 2010	(r203885)
@@ -1374,7 +1374,7 @@ struct aac_srb {
 	u_int32_t		retry_limit;
 	u_int32_t		cdb_len;
 	u_int8_t		cdb[16];
-	struct aac_sg_table	sg_map32;
+	struct aac_sg_table	sg_map;
 };
 
 enum {

Modified: head/sys/dev/aac/aacvar.h
==============================================================================
--- head/sys/dev/aac/aacvar.h	Sun Feb 14 17:03:20 2010	(r203884)
+++ head/sys/dev/aac/aacvar.h	Sun Feb 14 17:14:11 2010	(r203885)
@@ -37,6 +37,16 @@
 #include <sys/selinfo.h>
 #include <geom/geom_disk.h>
 
+#define	AAC_TYPE_DEVO			1
+#define	AAC_TYPE_ALPHA			2
+#define	AAC_TYPE_BETA			3
+#define	AAC_TYPE_RELEASE		4
+
+#define	AAC_DRIVER_MAJOR_VERSION	2
+#define	AAC_DRIVER_MINOR_VERSION	1
+#define	AAC_DRIVER_BUGFIX_LEVEL		9
+#define	AAC_DRIVER_TYPE			AAC_TYPE_RELEASE
+
 #ifndef AAC_DRIVER_BUILD
 # define AAC_DRIVER_BUILD 1
 #endif


More information about the svn-src-all mailing list