Date: Thu, 4 Aug 2005 18:18:39 -0400 From: "Heck, Steve" <Steve.Heck@am.sony.com> To: <freebsd-scsi@freebsd.org> Subject: [cam_periph_mapmen:?] Message-ID: <FFB1FA1FB113D3119E0E0090273AE57709539950@US-BC-XMSG-1>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FFB1FA1FB113D3119E0E0090273AE57709539950>