From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 5 22:46:53 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95539106564A for ; Mon, 5 Mar 2012 22:46:53 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 242B68FC08 for ; Mon, 5 Mar 2012 22:46:53 +0000 (UTC) Received: by obbwc7 with SMTP id wc7so6984541obb.13 for ; Mon, 05 Mar 2012 14:46:52 -0800 (PST) Received-SPF: pass (google.com: domain of chuck@tuffli.net designates 10.182.52.104 as permitted sender) client-ip=10.182.52.104; Authentication-Results: mr.google.com; spf=pass (google.com: domain of chuck@tuffli.net designates 10.182.52.104 as permitted sender) smtp.mail=chuck@tuffli.net Received: from mr.google.com ([10.182.52.104]) by 10.182.52.104 with SMTP id s8mr1856620obo.59.1330987612848 (num_hops = 1); Mon, 05 Mar 2012 14:46:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.52.104 with SMTP id s8mr1632686obo.59.1330987612790; Mon, 05 Mar 2012 14:46:52 -0800 (PST) Received: by 10.60.67.226 with HTTP; Mon, 5 Mar 2012 14:46:52 -0800 (PST) Date: Mon, 5 Mar 2012 14:46:52 -0800 Message-ID: From: Chuck Tuffli To: freebsd-scsi Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmrOaH5oylsregyhARarQdOfx80ksNZTU+pW2vhjSCin+2BiNj8+uuSimvPzISQXt2kDuNd Subject: [patch] CTL should check condition INQUIRY with invalid LUN X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 22:46:53 -0000 Currently, the CTL responds to INQUIRY commands targeted at invalid LUNs by returning valid data with the peripheral qualifier set to LU OFFLINE. This patch instead returns a check condition with LU NOT READY. Linux initiators see the LU OFFLINE and start creating SG devices, but are not able to finish. The offline also causes them to keep probing LUNs. https://gist.github.com/1981701 ---chuck