Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jun 2015 07:50:28 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284540 - head/sys/dev/isp
Message-ID:  <201506180750.t5I7oSK1048451@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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