svn commit: r271703 - head/sys/dev/iscsi
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed Sep 17 07:55:24 UTC 2014
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);
More information about the svn-src-all
mailing list