From owner-freebsd-scsi@FreeBSD.ORG Fri Jan 21 16:21:55 2011 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 B3FC5106566B for ; Fri, 21 Jan 2011 16:21:55 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3AFB48FC0C for ; Fri, 21 Jan 2011 16:21:54 +0000 (UTC) Received: by bwz12 with SMTP id 12so1749467bwz.13 for ; Fri, 21 Jan 2011 08:21:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:x-enigmail-version :content-type:content-transfer-encoding; bh=paYfMbs6hv34f2bqBut6EMRDatQwjI2zjcgMaZkXO7M=; b=wOU7WMXP26prQwBwgyUhAa2fk2RO8+6Mnn0ToAYqSYGdJmEXfuV936BjYXVS1KmdrA I5eVomjFbnJivwaAxpDfbQEs3hGVnCxJMFYlr2SQ4lX9mcsZTswb/5lZ7tS2LQXaYT6i tOfLakE+eAaCtDhMCnQWAJCxJPmFtdj7OVcKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=CU82yiBsRTh5itqcFgKd8ZEG8r4rVTefsfnuvNt8x/0nQbyEysY/XOxWXEjviyj2YN nPfOAq97Sk2wTQeEeEyu1qUkYfoTqEVL5btBBrCm8nfEjNOAkAY0BH5r/RjtxVIUQgsa fKfcAzaKRK74OaUfb1FLPh0IUN6ItKRpkxnPI= Received: by 10.204.59.76 with SMTP id k12mr844365bkh.70.1295626913832; Fri, 21 Jan 2011 08:21:53 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id q18sm4678127bka.15.2011.01.21.08.21.51 (version=SSLv3 cipher=RC4-MD5); Fri, 21 Jan 2011 08:21:52 -0800 (PST) Sender: Alexander Motin Message-ID: <4D39B272.7050909@FreeBSD.org> Date: Fri, 21 Jan 2011 18:21:06 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: "G. Paul Ziemba" , freebsd-scsi@freebsd.org References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: Re: rescan causes offlined tape to reload 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: Fri, 21 Jan 2011 16:21:55 -0000 G. Paul Ziemba wrote: > mj@feral.com (Matthew Jacob) writes: > >> My recollection is that when you 'eject' a DLT, unless you operate the >> handle, or it's part of a changer unit that does it for you, any >> subsequent Test Unit Ready will reload it. > >> Other than that, there are couple of candidate changes in the XPT layer >> in the time frame you talk of which may be inducing this behavior. Any >> way you can get a trace of the SCSI commands sent? > > Hmm. The same drive did not reload the tape upon rescan before I > upgraded to FreeBSD-stable from Jan 11, so I do not think Test Unit > Ready is causing it. > > I rebuilt the kernel to set CAMDEBUG. The kernel and userland are > still the code from FreeBSD current as of 2011-Jan-11. > > It looks as if "camcontrol rescan" generates a command specifically > to load the media (distinct from the TEST UNIT READY). > > # uname -a > FreeBSD hairball.ziemba.us 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Thu Jan 20 20:28:21 PST 2011 root@hairball:/usr/obj/usr/src/sys/GPZ-110111-camdebug i386 > > # camcontrol debug -c 0:4 > Debugging enabled for 0:4:-1 > # camcontrol eject sa0 > Unit stopped successfully, Media ejected > > Jan 20 21:07:26 hairball kernel: (pass2:sym0:0:4:0): LOAD UNLOAD. CDB: 1b 0 0 0 2 0 > > # camcontrol rescan all > > Jan 20 21:08:40 hairball kernel: (probe4:sym0:0:4:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > Jan 20 21:08:44 hairball kernel: (probe4:sym0:0:4:0): LOAD UNLOAD. CDB: 1b 0 0 0 3 0 > Jan 20 21:09:34 hairball kernel: sym0:4:control msgout: 80 6. > Jan 20 21:09:34 hairball kernel: (probe4:sym0:0:4:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > Jan 20 21:09:34 hairball kernel: (probe4:sym0:0:4:0): INQUIRY. CDB: 12 0 0 0 24 0 > Jan 20 21:09:34 hairball kernel: (probe4:sym0:0:4:0): INQUIRY. CDB: 12 1 0 0 ff 0 > Jan 20 21:09:34 hairball kernel: (probe4:sym0:0:4:0): INQUIRY. CDB: 12 1 80 0 ff 0 > Jan 20 21:09:34 hairball kernel: (probe0:sym0:0:4:1): INQUIRY. CDB: 12 20 0 0 24 0 > Jan 20 21:09:34 hairball kernel: (probe0:sym0:0:4:2): INQUIRY. CDB: 12 40 0 0 24 0 > Jan 20 21:09:34 hairball kernel: (probe0:sym0:0:4:3): INQUIRY. CDB: 12 60 0 0 24 0 > Jan 20 21:09:34 hairball kernel: (probe0:sym0:0:4:4): INQUIRY. CDB: 12 80 0 0 24 0 > Jan 20 21:09:34 hairball kernel: (probe0:sym0:0:4:5): INQUIRY. CDB: 12 a0 0 0 24 0 > Jan 20 21:09:34 hairball kernel: (probe0:sym0:0:4:6): INQUIRY. CDB: 12 c0 0 0 24 0 > Jan 20 21:09:34 hairball kernel: (probe0:sym0:0:4:7): INQUIRY. CDB: 12 e0 0 0 24 0 For the full picture it would be nice to see responses device sent. I suppose that in response to TUR device returns some status that implies tray closing/load. -- Alexander Motin