From owner-freebsd-scsi@FreeBSD.ORG Thu Jul 26 22:51:29 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F137106566B; Thu, 26 Jul 2012 22:51:29 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A4BA18FC0A; Thu, 26 Jul 2012 22:51:28 +0000 (UTC) Received: by weyx56 with SMTP id x56so2016213wey.13 for ; Thu, 26 Jul 2012 15:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=rAynNnU22iw2u5EvdLxw9krmd6gtanSKpGevtGoOrR0=; b=tG0Qz1F35nqqiph5jbw9JiW4rF5OtsI4l6kHjQInB3B6y9+6Ud/+QgF8LMHjLXrBIN l6FfC8gpr34zUlpJKtLbIbsx9RYr6NvBEoAvPph5v7klIVvoE7T1H5M+Iuo3JfkV+tdS a/yfWXk8Qexa6zq4KFWMCrBiSYBpk+mCkjYlJv1eE62ly2UJL6IAwiIXz8GAOwj0evXr h5qU8wdHNvKdH1hdWSo5b1e7nAvfhLV0F9Sdxy1OQeSJpbq2Lb8L5rAcAF1kxN+v6gif +JQ7EDvMhVwgKD4x9sVAPtfqPsj92U8gumZ+YLd+3uMfz/gBE+5yFE/iZ3nhiA63PmUb jZfg== Received: by 10.180.103.136 with SMTP id fw8mr902199wib.20.1343343087544; Thu, 26 Jul 2012 15:51:27 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id el6sm10666830wib.8.2012.07.26.15.51.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 15:51:26 -0700 (PDT) Sender: Alexander Motin Message-ID: <5011C9EC.5080008@FreeBSD.org> Date: Fri, 27 Jul 2012 01:51:24 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andriy Gapon References: <500D54B9.1010800@FreeBSD.org> <500E538E.1060908@FreeBSD.org> In-Reply-To: <500E538E.1060908@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@FreeBSD.org, freebsd-geom@FreeBSD.org Subject: Re: [RFC] CAM/GEOM media change notification 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: Thu, 26 Jul 2012 22:51:29 -0000 On 24.07.2012 10:49, Andriy Gapon wrote: > on 23/07/2012 16:42 Alexander Motin said the following: >> Patch can be found here: >> http://people.freebsd.org/~mav/mediachange8.patch >> >> Any comments/objections/propositions? > > Alexander, > > would it make sense for scsi_cd to also use GET EVENT STATUS NOTIFICATION > command (4A) with Polled flag and Media bit set in Notification Class in > addition to TUR for devices that do not support asynchronous notification? > > I think that this should increase reliability of detecting CD media changes > between polls. Thanks for the hint. I've read about that command, but haven't found it useful. If media was quickly removed and reinserted and we missed it, then device will send us UNIT ATTENTION on first following request, which we will handle. If media was quickly inserted and removed and we missed it, then we just have nothing to do about it. It could be interesting to use GET EVENT STATUS NOTIFICATION in asynchronous mode to avoid polling, but it works only for queued commands, which are not supported by ATAPI devices. -- Alexander Motin