From owner-svn-src-stable@FreeBSD.ORG Tue Nov 17 19:36:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DA641065670; Tue, 17 Nov 2009 19:36:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 621718FC0A; Tue, 17 Nov 2009 19:36:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHJa6c0033236; Tue, 17 Nov 2009 19:36:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHJa6oc033233; Tue, 17 Nov 2009 19:36:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911171936.nAHJa6oc033233@svn.freebsd.org> From: Alexander Motin Date: Tue, 17 Nov 2009 19:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199420 - in stable/8/sys/dev: ahci siis X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 19:36:06 -0000 Author: mav Date: Tue Nov 17 19:36:06 2009 New Revision: 199420 URL: http://svn.freebsd.org/changeset/base/199420 Log: MFC r197838: On command timeout handle frozen command first, to not run it inside XXX_end_transaction(). Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Nov 17 19:35:39 2009 (r199419) +++ stable/8/sys/dev/ahci/ahci.c Tue Nov 17 19:36:06 2009 (r199420) @@ -1259,15 +1259,16 @@ ahci_timeout(struct ahci_slot *slot) if (!ch->readlog) xpt_freeze_simq(ch->sim, ch->numrslots); - /* Handle command with timeout. */ - ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); - /* Handle the rest of commands. */ + /* Handle frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; ch->frozen = NULL; fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ; xpt_done(fccb); } + /* Handle command with timeout. */ + ahci_end_transaction(&ch->slot[slot->slot], AHCI_ERR_TIMEOUT); + /* Handle the rest of commands. */ for (i = 0; i < ch->numslots; i++) { /* Do we have a running request on slot? */ if (ch->slot[i].state < AHCI_SLOT_RUNNING) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Tue Nov 17 19:35:39 2009 (r199419) +++ stable/8/sys/dev/siis/siis.c Tue Nov 17 19:36:06 2009 (r199420) @@ -982,15 +982,16 @@ device_printf(dev, "%s is %08x ss %08x r if (!ch->readlog) xpt_freeze_simq(ch->sim, ch->numrslots); - /* Handle command with timeout. */ - siis_end_transaction(&ch->slot[slot->slot], SIIS_ERR_TIMEOUT); - /* Handle the rest of commands. */ + /* Handle frozen command. */ if (ch->frozen) { union ccb *fccb = ch->frozen; ch->frozen = NULL; fccb->ccb_h.status = CAM_REQUEUE_REQ | CAM_RELEASE_SIMQ; xpt_done(fccb); } + /* Handle command with timeout. */ + siis_end_transaction(&ch->slot[slot->slot], SIIS_ERR_TIMEOUT); + /* Handle the rest of commands. */ for (i = 0; i < SIIS_MAX_SLOTS; i++) { /* Do we have a running request on slot? */ if (ch->slot[i].state < SIIS_SLOT_RUNNING)