Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2012 15:23:01 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r240023 - stable/9/sys/dev/isp
Message-ID:  <201209021523.q82FN1Aw024989@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Sun Sep  2 15:23:01 2012
New Revision: 240023
URL: http://svn.freebsd.org/changeset/base/240023

Log:
  MFC of 239010
  
  Oops. We only do allocate room for extended commands
  and responses for 2300 cards are newer.

Modified:
  stable/9/sys/dev/isp/isp_pci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/isp/   (props changed)

Modified: stable/9/sys/dev/isp/isp_pci.c
==============================================================================
--- stable/9/sys/dev/isp/isp_pci.c	Sun Sep  2 15:21:55 2012	(r240022)
+++ stable/9/sys/dev/isp/isp_pci.c	Sun Sep  2 15:23:01 2012	(r240023)
@@ -1482,16 +1482,18 @@ imc(void *arg, bus_dma_segment_t *segs, 
 	segs->ds_addr += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp));
 	imushp->vbase += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp));
 
-	imushp->isp->isp_osinfo.ecmd_dma = segs->ds_addr;
-	imushp->isp->isp_osinfo.ecmd_free = (isp_ecmd_t *)imushp->vbase;
-	imushp->isp->isp_osinfo.ecmd_base = imushp->isp->isp_osinfo.ecmd_free;
-	for (ecmd = imushp->isp->isp_osinfo.ecmd_free; ecmd < &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS]; ecmd++) {
-		if (ecmd == &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS - 1]) {
-			ecmd->next = NULL;
-		} else {
-			ecmd->next = ecmd + 1;
-		}
-	}
+	if (imushp->isp->isp_type >= ISP_HA_FC_2300) {
+        imushp->isp->isp_osinfo.ecmd_dma = segs->ds_addr;
+        imushp->isp->isp_osinfo.ecmd_free = (isp_ecmd_t *)imushp->vbase;
+        imushp->isp->isp_osinfo.ecmd_base = imushp->isp->isp_osinfo.ecmd_free;
+        for (ecmd = imushp->isp->isp_osinfo.ecmd_free; ecmd < &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS]; ecmd++) {
+            if (ecmd == &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS - 1]) {
+                ecmd->next = NULL;
+            } else {
+                ecmd->next = ecmd + 1;
+            }
+        }
+    }
 #ifdef	ISP_TARGET_MODE
 	segs->ds_addr += (N_XCMDS * XCMD_SIZE);
 	imushp->vbase += (N_XCMDS * XCMD_SIZE);



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