Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2014 07:55:24 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271703 - head/sys/dev/iscsi
Message-ID:  <201409170755.s8H7tOLC091866@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Wed Sep 17 07:55:23 2014
New Revision: 271703
URL: http://svnweb.freebsd.org/changeset/base/271703

Log:
  Fix LUN discovery for targets that don't support REPORT_LUNS, broken
  in r263741.  At least with CTL (slightly modified to report SPC2) there
  is still some problem: it doesn't seem to find LUNs higher than 7.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==============================================================================
--- head/sys/dev/iscsi/iscsi.c	Wed Sep 17 07:08:59 2014	(r271702)
+++ head/sys/dev/iscsi/iscsi.c	Wed Sep 17 07:55:23 2014	(r271703)
@@ -2179,7 +2179,12 @@ iscsi_action(struct cam_sim *sim, union 
 		cpi->hba_misc = PIM_EXTLUNS;
 		cpi->hba_eng_cnt = 0;
 		cpi->max_target = 0;
-		cpi->max_lun = 0;
+		/*
+		 * Note that the variable below is only relevant for targets
+		 * that don't claim compliance with anything above SPC2, which
+		 * means they don't support REPORT_LUNS.
+		 */
+		cpi->max_lun = 255;
 		cpi->initiator_id = ~0;
 		strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
 		strlcpy(cpi->hba_vid, "iSCSI", HBA_IDLEN);



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