From owner-svn-src-all@FreeBSD.ORG Fri Sep 24 16:40:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BDF2106566B; Fri, 24 Sep 2010 16:40:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B14C8FC15; Fri, 24 Sep 2010 16:40:47 +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 o8OGelY7031913; Fri, 24 Sep 2010 16:40:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8OGelKS031911; Fri, 24 Sep 2010 16:40:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201009241640.o8OGelKS031911@svn.freebsd.org> From: Marius Strobl Date: Fri, 24 Sep 2010 16:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213105 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 16:40:47 -0000 Author: marius Date: Fri Sep 24 16:40:46 2010 New Revision: 213105 URL: http://svn.freebsd.org/changeset/base/213105 Log: Improve r56796; the reply handler actually may remove the request from the chain in which case it shouldn't be removed twice. Reported by: Staale Kristoffersen MFC after: 1 week Modified: head/sys/dev/mpt/mpt.c Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Fri Sep 24 15:12:18 2010 (r213104) +++ head/sys/dev/mpt/mpt.c Fri Sep 24 16:40:46 2010 (r213105) @@ -844,13 +844,14 @@ mpt_complete_request_chain(struct mpt_so MSG_REQUEST_HEADER *msg_hdr; u_int cb_index; - TAILQ_REMOVE(chain, req, links); msg_hdr = (MSG_REQUEST_HEADER *)req->req_vbuf; ioc_status_frame.Function = msg_hdr->Function; ioc_status_frame.MsgContext = msg_hdr->MsgContext; cb_index = MPT_CONTEXT_TO_CBI(le32toh(msg_hdr->MsgContext)); mpt_reply_handlers[cb_index](mpt, req, msg_hdr->MsgContext, &ioc_status_frame); + if (mpt_req_on_pending_list(mpt, req) != 0) + TAILQ_REMOVE(chain, req, links); } }