From owner-freebsd-scsi Tue Oct 8 9:20:47 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C01F37B401 for ; Tue, 8 Oct 2002 09:20:46 -0700 (PDT) Received: from mail2.lsil.com (mail2.lsil.com [147.145.40.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37C8743E4A for ; Tue, 8 Oct 2002 09:20:46 -0700 (PDT) (envelope-from emoore@lsil.com) Received: from mhbs.lsil.com (mhbs [147.145.31.100]) by mail2.lsil.com (8.12.4/8.12.4) with ESMTP id g98F2RQg012094 for ; Tue, 8 Oct 2002 09:20:41 -0700 (PDT) Received: from atl1.se.lsil.com by mhbs.lsil.com with ESMTP for freebsd-scsi@FreeBSD.ORG; Tue, 8 Oct 2002 09:20:32 -0700 Received: by EXA-ATLANTA.se.lsil.com with Internet Mail Service (5.5.2653.19) id ; Tue, 8 Oct 2002 12:20:30 -0400 Message-Id: <0E3FA95632D6D047BA649F95DAB60E5701528EF0@EXA-ATLANTA.se.lsil.com> From: "Moore, Eric Dean" To: freebsd-scsi@FreeBSD.ORG Subject: CAM:READ-12 and WRITE-12 support Date: Tue, 8 Oct 2002 12:20:29 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I'm concerned about 12 byte cdbs support in scsi_read_write() [source /sys/cam/scsi/scsi_all.c]. For 12 byte cdb's the block_count is being set in scsi_ulto4b(block_count,scsi_cmd->length); I think there might be a problem with the location of the length member in structure scsi_rw_12. from [sys/cam/scsi/scsi-all.h] struct scsi_rw_12 { u_int8_t opcode; u_int8_t byte2; u_int8_t addr[4]; u_int8_t reserved; u_int8_t length[4]; u_int8_t control; }; According to SCSI-2 spec it should be struct scsi_rw_12 { u_int8_t opcode; u_int8_t byte2; u_int8_t addr[4]; u_int8_t length[4]; u_int8_t reserved; u_int8_t control; }; * should the reserved field should be in bytes 7-10, instead of byte 8-11. Eric Moore To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message