From owner-svn-src-head@FreeBSD.ORG Mon Apr 29 22:56:42 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C8C44D2F; Mon, 29 Apr 2013 22:56:42 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 78B551D47; Mon, 29 Apr 2013 22:56:42 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id r3TMufS1001935; Mon, 29 Apr 2013 16:56:41 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r3TMufnd001934; Mon, 29 Apr 2013 16:56:41 -0600 (MDT) (envelope-from ken) Date: Mon, 29 Apr 2013 16:56:41 -0600 From: "Kenneth D. Merry" To: Steven Hartland Subject: Re: svn commit: r249939 - head/sys/cam/scsi Message-ID: <20130429225641.GA1375@nargothrond.kdm.org> References: <201304261617.r3QGH58Q048395@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201304261617.r3QGH58Q048395@svn.freebsd.org> User-Agent: Mutt/1.4.2i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2013 22:56:42 -0000 On Fri, Apr 26, 2013 at 16:17:05 +0000, Steven Hartland wrote: > Author: smh > Date: Fri Apr 26 16:17:04 2013 > New Revision: 249939 > URL: http://svnweb.freebsd.org/changeset/base/249939 > > Log: > Added available delete methods discovery during device probe, including the > maximum sizes for said methods, which are used when processing BIO_DELETE > requests. This includes updating UNMAP support discovery to be based on > SBC-3 T10/1799-D Revision 31 specification. > > Added ATA TRIM support to cam scsi devices via ATA Pass-Through(16) > > sys/cam/scsi/scsi_da.c: > - Added ATA Data Set Management TRIM support via ATA Pass-Through(16) > as a delete_method > This adds a lot of unnecessary verbosity for devices that don't support ATA passthrough. For example: (da7:iscsi4:0:0:0): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 00 00 00 00 00 00 00 40 ec 00 (da7:iscsi4:0:0:0): CAM status: SCSI Status Error (da7:iscsi4:0:0:0): SCSI status: Check Condition (da7:iscsi4:0:0:0): Retrying command (per sense data) (2:2:0:0): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 00 00 00 00 00 00 00 40 ec 00 (2:2:0:0): Tag: 0x00f6, Type: 1 (2:2:0:0): CTL Status: SCSI Error (2:2:0:0): SCSI Status: Check Condition (2:2:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command operation code) (2:2:0:0): Command byte 0 is invalid (da8:iscsi4:0:0:1): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 00 00 00 00 00 00 00 40 ec 00 (da8:iscsi4:0:0:1): CAM status: SCSI Status Error (da8:iscsi4:0:0:1): SCSI status: Check Condition (da8:iscsi4:0:0:1): Retrying command (per sense data) (da8:iscsi4:0:0:1): ATA COMMAND PASS THROUGH(16). CDB: 85 08 0a 00 00 02 00 00 00 00 00 00 00 40 ec 00 (da8:iscsi4:0:0:1): CAM status: SCSI Status Error (da8:iscsi4:0:0:1): SCSI status: Check Condition (da8:iscsi4:0:0:1): Error 5, Retries exhausted That is with CTL and and trasz's new iSCSI initiator, but you should see it with any CTL configuration. (And probably with any controller or device that doesn't support ATA passthrough.) So, please: - Check for the presence of VPD page 0x89 before sending an ATA passthrough command. The spec (sat3r03 in this case) says that it "shall" be implemented, so I think we can count on that. - If the target returns an illegal request sense key, don't retry again. The target will keep returning illegal request Ken -- Kenneth Merry ken@FreeBSD.ORG