From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 4 22:18:44 2005 Return-Path: X-Original-To: freebsd-scsi@freebsd.org 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 A198116A41F for ; Thu, 4 Aug 2005 22:18:44 +0000 (GMT) (envelope-from Steve.Heck@am.sony.com) Received: from mail58-haw-R.bigfish.com (mail-haw.bigfish.com [12.129.199.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F84E43D4C for ; Thu, 4 Aug 2005 22:18:43 +0000 (GMT) (envelope-from Steve.Heck@am.sony.com) Received: from mail58-haw.bigfish.com (localhost.localdomain [127.0.0.1]) by mail58-haw-R.bigfish.com (Postfix) with ESMTP id B98D44AA53A for ; Thu, 4 Aug 2005 22:18:42 +0000 (UTC) X-BigFish: V Received: by mail58-haw (MessageSwitch) id 1123193922654829_1880; Thu, 4 Aug 2005 22:18:42 +0000 (UCT) Received: from mail58-red.bigfish.com (mail-red.bigfish.com [216.148.222.61]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by mail58-haw.bigfish.com (Postfix) with ESMTP id 997B24AA4C7 for ; Thu, 4 Aug 2005 22:18:42 +0000 (UTC) Received: from mail8.fw-bc.sony.com (mail8.fw-bc.sony.com [160.33.98.75]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by mail58-red.bigfish.com (Postfix) with ESMTP id 3DADF29D514 for ; Thu, 4 Aug 2005 22:18:42 +0000 (UTC) Received: from mail1.bc.in.sel.sony.com (mail1.bc.in.sel.sony.com [43.144.65.111]) by mail8.fw-bc.sony.com (8.12.11/8.12.11) with ESMTP id j74MI8NU024105 for ; Thu, 4 Aug 2005 22:18:08 GMT Received: from USBMAXIM01.am.sony.com (usbmaxim01.am.sony.com [43.145.108.25]) by mail1.bc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id j74MIekw018496 for ; Thu, 4 Aug 2005 22:18:40 GMT content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Date: Thu, 4 Aug 2005 18:18:39 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [cam_periph_mapmen:?] Thread-Index: AcWZQndDVB94UB3ZSPGoixiaJ6gmAA== From: "Heck, Steve" To: Subject: [cam_periph_mapmen:?] 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, 04 Aug 2005 22:18:44 -0000 I am having problems Writing to a SCSI tape drive. =20 First the Block Size is being set to 65536 Bytes by Mode Select which = succeeds. printf ("Data compression enabled.\n"); =20 buf_data1c[0] =3D 0x00; buf_data1c[1] =3D 0x00; buf_data1c[2] =3D 0x10; buf_data1c[3] =3D 0x08; buf_data1c[4] =3D 0x7f; buf_data1c[5] =3D 0x00; buf_data1c[6] =3D 0x00; buf_data1c[7] =3D 0x00; buf_data1c[8] =3D 0x00; buf_data1c[9] =3D 0x01; buf_data1c[10] =3D 0x00; buf_data1c[11] =3D 0x00; buf_data1c[12] =3D 0x0f; buf_data1c[13] =3D 0x0e; buf_data1c[14] =3D 0xc0; buf_data1c[15] =3D 0x80; buf_data1c[16] =3D 0x00; buf_data1c[17] =3D 0x00; buf_data1c[18] =3D 0x00; buf_data1c[19] =3D 0x00; buf_data1c[20] =3D 0x00; buf_data1c[21] =3D 0x00; buf_data1c[22] =3D 0x00; buf_data1c[23] =3D 0x00; buf_data1c[24] =3D 0x00; buf_data1c[25] =3D 0x00; buf_data1c[26] =3D 0x00; buf_data1c[27] =3D 0x00; //unsigned char header[len]; memset( header, 0, len ); memset(&ccb,0,sizeof(ccb)); ccb.ccb_h.path_id =3D cam->path_id; ccb.ccb_h.target_id =3D cam->target_id; ccb.ccb_h.target_lun =3D cam->target_lun; cam_fill_csio (&(ccb.csio), 1, NULL, CAM_DIR_OUT, MSG_SIMPLE_Q_TAG, = buf_data1c, sizeof(buf_data1c), sizeof(ccb.csio.sense_data), 0, = 30*1000); ccb.csio.cdb_len =3D 6; ccb.csio.cdb_io.cdb_bytes[0] =3D 0x15; // Mode Select ccb.csio.cdb_io.cdb_bytes[1] =3D 0x10; ccb.csio.cdb_io.cdb_bytes[4] =3D 0x1c; ccb.csio.cdb_io.cdb_bytes[5] =3D 0x00; =20 =20 //int ret; if ((ret =3D cam_send_ccb(cam, &ccb)) < 0) { printf("cam_send_ccb: failed\n"); cam_close_device(cam); return -1; } The problem occurs when I try to Write one Fixed Block. unsigned char wbuf_data[65536] memset( header, 0, len ); memset(&ccb,0,sizeof(ccb)); ccb.ccb_h.path_id =3D cam->path_id; ccb.ccb_h.target_id =3D cam->target_id; ccb.ccb_h.target_lun =3D cam->target_lun; cam_fill_csio (&(ccb.csio), 1, NULL, CAM_DIR_OUT, MSG_SIMPLE_Q_TAG, = wbuf_data, sizeof(wbuf_data), sizeof(ccb.csio.sense_data), 0, 900*1000); ccb.csio.cdb_len =3D 6; ccb.csio.cdb_io.cdb_bytes[0] =3D 0x0a; // Write ccb.csio.cdb_io.cdb_bytes[1] =3D 0x01; ccb.csio.cdb_io.cdb_bytes[4] =3D 0x01; ccb.csio.cdb_io.cdb_bytes[5] =3D 0x00; =20 if ((ret =3D cam_send_ccb(cam, &ccb)) < 0) { printf("cam_send_ccb: failed\n"); cam_close_device(cam); return -1; } I get this error: cam_periph_mapmem: attempt to map 68480 bytes, which is greater that = DFLTPHYS(65536) cam_send_ccb: failed I do not see the Write cdb being sent when I make a SCSI trace.=20 Any help would be appreciated. Thanks, Steve