From owner-svn-src-stable-10@FreeBSD.ORG Sun Nov 2 17:25:04 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBA66FF9; Sun, 2 Nov 2014 17:25:04 +0000 (UTC) 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 9D53CC8A; Sun, 2 Nov 2014 17:25:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sA2HP4ZN027898; Sun, 2 Nov 2014 17:25:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sA2HP463027897; Sun, 2 Nov 2014 17:25:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411021725.sA2HP463027897@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 2 Nov 2014 17:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273975 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2014 17:25:04 -0000 Author: mav Date: Sun Nov 2 17:25:03 2014 New Revision: 273975 URL: https://svnweb.freebsd.org/changeset/base/273975 Log: MFC r272406: Make disconnected LUN 0 don't remain in half-configured state if there are no LUNs on SPC-3 target after we tried REPORT LUNS. Modified: stable/10/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_xpt.c Sun Nov 2 17:23:44 2014 (r273974) +++ stable/10/sys/cam/scsi/scsi_xpt.c Sun Nov 2 17:25:03 2014 (r273975) @@ -1197,12 +1197,6 @@ out: SID_ANSI_REV(inq_buf) > SCSI_REV_SPC2 && (SCSI_QUIRK(path->device)->quirks & CAM_QUIRK_NORPTLUNS) == 0) { - if (path->device->flags & - CAM_DEV_UNCONFIGURED) { - path->device->flags &= - ~CAM_DEV_UNCONFIGURED; - xpt_acquire_device(path->device); - } PROBE_SET_ACTION(softc, PROBE_REPORT_LUNS); periph->path->target->rpl_size = 16; xpt_release_ccb(done_ccb); @@ -1313,14 +1307,6 @@ out: tlun, 8); CAM_DEBUG(path, CAM_DEBUG_PROBE, ("lun 0 in position %u\n", idx)); - } else { - /* - * There is no lun 0 in our list. Destroy - * the validity of the inquiry data so we - * bail here and now. - */ - path->device->flags &= - ~CAM_DEV_INQUIRY_DATA_VALID; } } /* @@ -1333,7 +1319,8 @@ out: probe_purge_old(path, lp, softc->flags); lp = NULL; } - if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) { + if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID && + SID_QUAL(&path->device->inq_data) == SID_QUAL_LU_CONNECTED) { struct scsi_inquiry_data *inq_buf; inq_buf = &path->device->inq_data; if (INQ_DATA_TQ_ENABLED(inq_buf)) @@ -1348,6 +1335,8 @@ out: if (lp) { free(lp, M_CAMXPT); } + PROBE_SET_ACTION(softc, PROBE_INVALID); + xpt_release_ccb(done_ccb); break; } case PROBE_MODE_SENSE: