From owner-svn-src-head@FreeBSD.ORG Thu Jun 18 07:50:28 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 727D2761; Thu, 18 Jun 2015 07:50:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 606F2C7E; Thu, 18 Jun 2015 07:50:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5I7oS05048452; Thu, 18 Jun 2015 07:50:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5I7oSK1048451; Thu, 18 Jun 2015 07:50:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506180750.t5I7oSK1048451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 18 Jun 2015 07:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284540 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2015 07:50:28 -0000 Author: mav Date: Thu Jun 18 07:50:27 2015 New Revision: 284540 URL: https://svnweb.freebsd.org/changeset/base/284540 Log: In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. MFC after: 1 week Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Thu Jun 18 06:00:17 2015 (r284539) +++ head/sys/dev/isp/isp_freebsd.c Thu Jun 18 07:50:27 2015 (r284540) @@ -2931,6 +2931,14 @@ isp_handle_platform_ctio(ispsoftc_t *isp atp = isp_find_atpd(isp, tptr, ((ct_entry_t *)arg)->ct_fwhandle); } if (atp == NULL) { + /* + * In case of target mode disable at least ISP2532 return + * invalid zero ct_rxid value. Try to workaround that using + * tag_id from the CCB, pointed by valid ct_syshandle. + */ + atp = isp_find_atpd(isp, tptr, ccb->csio.tag_id); + } + if (atp == NULL) { rls_lun_statep(isp, tptr); isp_prt(isp, ISP_LOGERR, "%s: cannot find adjunct for %x after I/O", __func__, ccb->csio.tag_id); return;