Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Aug 2012 14:25:36 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239010 - head/sys/dev/isp
Message-ID:  <201208031425.q73EPaLO032991@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Fri Aug  3 14:25:35 2012
New Revision: 239010
URL: http://svn.freebsd.org/changeset/base/239010

Log:
  Oops. We only do allocate room for extended commands
  and responses for 2300 cards are newer.
  
  Sponsored by:	Spectralogic
  Noticed by:	Our Friend Manfred
  MFC after:	1 month
  X-MFC: 238869

Modified:
  head/sys/dev/isp/isp_pci.c

Modified: head/sys/dev/isp/isp_pci.c
==============================================================================
--- head/sys/dev/isp/isp_pci.c	Fri Aug  3 14:00:26 2012	(r239009)
+++ head/sys/dev/isp/isp_pci.c	Fri Aug  3 14:25:35 2012	(r239010)
@@ -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?201208031425.q73EPaLO032991>