svn commit: r249939 - head/sys/cam/scsi

Kenneth D. Merry ken at kdm.org
Mon Apr 29 22:56:42 UTC 2013


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 at FreeBSD.ORG


More information about the svn-src-head mailing list