Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2013 22:32:49 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r246690 - projects/physbio/sys/dev/siis
Message-ID:  <201302112232.r1BMWowE072786@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Feb 11 22:32:49 2013
New Revision: 246690
URL: http://svnweb.freebsd.org/changeset/base/246690

Log:
  The siis dma load callback siis_dmasetprd() does not handle the case
  nsegs == 0. Restore the direct call to siis_execute_transaction() for
  the ccbs which do not specify I/O.
  
  Discussed with:	jeff

Modified:
  projects/physbio/sys/dev/siis/siis.c

Modified: projects/physbio/sys/dev/siis/siis.c
==============================================================================
--- projects/physbio/sys/dev/siis/siis.c	Mon Feb 11 21:50:00 2013	(r246689)
+++ projects/physbio/sys/dev/siis/siis.c	Mon Feb 11 22:32:49 2013	(r246690)
@@ -994,9 +994,13 @@ siis_begin_transaction(device_t dev, uni
 	    (ccb->ataio.cmd.flags & (CAM_ATAIO_CONTROL | CAM_ATAIO_NEEDRESULT)))
 		ch->aslots |= (1 << slot->slot);
 	slot->dma.nsegs = 0;
-	slot->state = SIIS_SLOT_LOADING;
-	bus_dmamap_load_ccb(ch->dma.data_tag, slot->dma.data_map,
-	    ccb, siis_dmasetprd, slot, 0);
+	/* If request moves data, setup and load SG list */
+	if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
+		slot->state = SIIS_SLOT_LOADING;
+		bus_dmamap_load_ccb(ch->dma.data_tag, slot->dma.data_map,
+		    ccb, siis_dmasetprd, slot, 0);
+	} else
+		siis_execute_transaction(slot);
 }
 
 /* Locked by busdma engine. */



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