From owner-freebsd-scsi@FreeBSD.ORG Sun Jul 31 15:43:25 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 75B0A16A41F for ; Sun, 31 Jul 2005 15:43:25 +0000 (GMT) (envelope-from dualxeon@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0173543D45 for ; Sun, 31 Jul 2005 15:43:24 +0000 (GMT) (envelope-from dualxeon@gmail.com) Received: by rproxy.gmail.com with SMTP id r35so1199172rna for ; Sun, 31 Jul 2005 08:43:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=R+Pl/ZaAydcfcFKGtcJcwZ9IQjTw1Q1j5I1KyNK7dHm5n99gmyhH2/SLZsbwmbSUJPynC2tCKeiFV6BLXoUTVl9IzRr88J2nyQY3NVlJG/b5dVNh1X4N9A6NZjpb1hwV7i964N+oNMXExitDgN+LfwC/6Q13gymkpfasI6Vt7Gg= Received: by 10.38.9.24 with SMTP id 24mr677140rni; Sun, 31 Jul 2005 08:43:24 -0700 (PDT) Received: by 10.38.86.69 with HTTP; Sun, 31 Jul 2005 08:43:24 -0700 (PDT) Message-ID: Date: Sun, 31 Jul 2005 11:43:24 -0400 From: Frank Mancuso To: freebsd-scsi@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: scsi tape drive slow in freebsd X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Mancuso List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2005 15:43:25 -0000 hello there I have a scsi tape drive which is made by seagate python. It is a scsi 2. normally in linux or windows it takes about 2 hours and 30 mins to restore or backup. I just installed freebsd 4.11 and I started to restore and it has been running for more then 10 hours .. this is my dmesg ahc0: port 0xe800-0xe8ff mem 0xe1811000-0xe1811fff irq 11 at device 12.0 on= pci0 aic7860: Ultra Single Channel A, SCSI Id=3D7, 3/253 SCBs Waiting 15 seconds for SCSI devices to settle sa0: Removable Sequential Access SCSI-2 device I had to recompile the kernel to support my dual P3 I was wondering if maybe I had to add something in the kernel to speed this up.. thanks. From owner-freebsd-scsi@FreeBSD.ORG Sun Jul 31 16:32:25 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 4AEBD16A41F for ; Sun, 31 Jul 2005 16:32:25 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B3A743D45 for ; Sun, 31 Jul 2005 16:32:23 +0000 (GMT) (envelope-from jhs@flat.berklix.net) Received: from js.berklix.net (p549A4BA2.dip.t-dialin.net [84.154.75.162]) (authenticated bits=0) by tower.berklix.org (8.12.9p2/8.12.9) with ESMTP id j6VGWIxr096576; Sun, 31 Jul 2005 18:32:19 +0200 (CEST) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (fire.jhs.private [192.168.91.41]) by js.berklix.net (8.12.11/8.12.11) with ESMTP id j6VGW93N002544; Sun, 31 Jul 2005 18:32:12 +0200 (CEST) (envelope-from jhs@flat.berklix.net) Received: from fire.jhs.private (localhost.jhs.private [127.0.0.1]) by fire.jhs.private (8.13.1/8.13.1) with ESMTP id j6VGW9OM054232; Sun, 31 Jul 2005 18:32:09 +0200 (CEST) (envelope-from jhs@fire.jhs.private) Message-Id: <200507311632.j6VGW9OM054232@fire.jhs.private> To: Frank Mancuso In-Reply-To: Message from Frank Mancuso of "Sun, 31 Jul 2005 11:43:24 EDT." Date: Sun, 31 Jul 2005 18:32:09 +0200 From: "Julian H. Stacey" Cc: freebsd-scsi@freebsd.org Subject: Re: scsi tape drive slow in freebsd 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: Sun, 31 Jul 2005 16:32:25 -0000 Frank Mancuso wrote: > hello there I have a scsi tape drive which is made by seagate python. > It is a scsi 2. normally in linux or windows it takes about 2 hours > and 30 mins to restore or backup. I just installed freebsd 4.11 and I > started to restore and it has been running for more then 10 hours .. > > this is my dmesg > > ahc0: port 0xe800-0xe8ff mem 0xe1811000-0xe1811fff irq 11 at device 12.0 on pci0 > aic7860: Ultra Single Channel A, SCSI Id=7, 3/253 SCBs > Waiting 15 seconds for SCSI devices to settle > sa0: Removable Sequential Access SCSI-2 device > > I had to recompile the kernel to support my dual P3 I was wondering if > maybe I had to add something in the kernel to speed this up.. > > thanks. perhaps mt blocksize 512 or mt blocksize 0 I used to see vast slow down if reader wasnt reading how how the writer wrote it. Also think blocking with tar if that's what your using eg -b 10k or 60k or whatever Your ear should tell you if it's streaming or stop starting. Ref man mt -- Julian Stacey Consultant Systems Engineer, Munich. http://berklix.com Mail in Ascii (Html = Spam). Ihr Rauch = mein allergischer Kopfschmerz. From owner-freebsd-scsi@FreeBSD.ORG Mon Aug 1 11:02:09 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 DA5C616A421 for ; Mon, 1 Aug 2005 11:02:09 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4D9843D53 for ; Mon, 1 Aug 2005 11:02:09 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j71B2974017301 for ; Mon, 1 Aug 2005 11:02:09 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j71B27Yr017295 for freebsd-scsi@freebsd.org; Mon, 1 Aug 2005 11:02:07 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 1 Aug 2005 11:02:07 GMT Message-Id: <200508011102.j71B27Yr017295@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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: Mon, 01 Aug 2005 11:02:10 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/05/03] kern/27059 scsi (symbios) SCSI subsystem hangs under heav o [2001/06/29] kern/28508 scsi problems with backup to Tandberg SLR40 st o [2002/06/17] kern/39388 scsi ncr/sym drivers fail with 53c810 and more o [2002/07/22] kern/40895 scsi wierd kernel / device driver bug s [2003/09/30] kern/57398 scsi Current fails to install on mly(4) based o [2003/12/26] kern/60598 scsi wire down of scsi devices conflicts with a [2004/01/10] kern/61165 scsi [panic] kernel page fault after calling c o [2004/09/15] kern/71778 scsi 5.3 BETA3 doesnt see Adaptec 2015S FW Rev o [2004/12/02] kern/74607 scsi FreeBSD 5.3 install CD crashes on SCSI de o [2004/12/02] kern/74627 scsi Adaptec 2940U2W Can't boot 5.3 10 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/12/06] kern/23314 scsi aic driver fails to detect Adaptec 1520B o [2001/08/15] kern/29727 scsi [amr] [patch] amr_enquiry3 structure in a o [2002/02/23] kern/35234 scsi World access to /dev/pass? (for scanner) o [2002/06/02] kern/38828 scsi [feature request] DPT PM2012B/90 doesn't o [2002/10/29] kern/44587 scsi dev/dpt/dpt.h is missing defines required o [2003/10/01] kern/57469 scsi [patch] Quirk for Conner CP3500 6 problems total. From owner-freebsd-scsi@FreeBSD.ORG Tue Aug 2 16:08:39 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 0673216A41F; Tue, 2 Aug 2005 16:08:39 +0000 (GMT) (envelope-from ken@nargothrond.kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F03C43D45; Tue, 2 Aug 2005 16:08:38 +0000 (GMT) (envelope-from ken@nargothrond.kdm.org) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.12.11/8.12.11) with ESMTP id j72G8bkS040797; Tue, 2 Aug 2005 10:08:37 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.12.11/8.12.5/Submit) id j72G8Xan040796; Tue, 2 Aug 2005 10:08:33 -0600 (MDT) (envelope-from ken) Date: Tue, 2 Aug 2005 10:08:33 -0600 From: "Kenneth D. Merry" To: Reinhold Huber Message-ID: <20050802160833.GA40616@nargothrond.kdm.org> References: <20050802143200.GA24341@fs.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050802143200.GA24341@fs.tum.de> User-Agent: Mutt/1.4.2i X-Virus-Scanned: ClamAV 0.86.1/1001/Tue Aug 2 02:22:39 2005 on nargothrond.kdm.org X-Virus-Status: Clean Cc: freebsd-scsi@freebsd.org, freebsd-questions@freebsd.org Subject: Re: CAM SCSI, finding out bus ID, target and LUN 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: Tue, 02 Aug 2005 16:08:39 -0000 On Tue, Aug 02, 2005 at 16:32:00 +0200, Reinhold Huber wrote: > Hello, > > I'm trying to get bus ID, target and LUN to an open fd which is afaik > opened to the device special file, e.g. /dev/cd0 . > > So how do I get the information? Up to now, I didn't find IOCTL calls > (like in NetBSD) which deliver this kind of info, and first tries to > browse in CAM examples didn't help either. > > I tried on FreeBSD 5.3 and currently hope that there are no big > changes to this between 5.3 and 5.4 or even -current. If I'm > wrong with this, please correct me. > > Any pointer to docs or source is welcome. (For this sort of query you might get better answers from the freebsd-scsi list, CCed.) You could try issuing the CAMGETPASSTHRU ioctl. Unfortunately it was broken for the cd(4) driver before 5.4 when there is no media in the drive. It will give you the pass(4) instance associated with that particular cd(4) instance. It doesn't work for the da(4) driver, since the GEOM code has taken over the ioctl routine for that driver. It should work for the cd(4), ch(4), pass(4), pt(4), sa(4) and ses(4) drivers. The CCB header for the XPT_GDEVLIST CCB returned from the CAMGETPASSTHRU ioctl should have the correct path, target and LUN if that's all you want. (The pass driver instance and unit number are in the payload.) If you want something that works consistently across all CAM peripheral drivers, you'll need to know the device name and unit number of the device you're talking to. Then you can open its associated pass(4) device with cam_open_spec_device(3). If you just have the device path name, you can try cam_open_device(3). It will attempt to parse out the path name for you. In either case, the cam_device structure returned will also have the path, target and LUN for the device. One obvious prerequisite for all of this is that you have to know ahead of time that you're talking to a CAM device. These mechanisms don't work otherwise. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 4 10:03:03 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 3473116A41F for ; Thu, 4 Aug 2005 10:03:03 +0000 (GMT) (envelope-from benoit.panizzon@imp.ch) Received: from godot.imp.ch (godot.imp.ch [157.161.4.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9595D43D48 for ; Thu, 4 Aug 2005 10:03:02 +0000 (GMT) (envelope-from benoit.panizzon@imp.ch) Received: from go.imp.ch (go.imp.ch [IPv6:2001:4060:1:4133:20f:1fff:fe7d:d3da]) by godot.imp.ch (8.13.3/8.13.3) with ESMTP id j74A30nH010522 for ; Thu, 4 Aug 2005 12:03:00 +0200 (CEST) (envelope-from benoit.panizzon@imp.ch) Received: from ip6-localhost (ip6-localhost [IPv6:::1]) by go.imp.ch (8.13.4/8.13.4/Debian-3) with ESMTP id j74A2xvB011112 for ; Thu, 4 Aug 2005 12:03:00 +0200 From: Benoit Panizzon To: freebsd-scsi@freebsd.org Date: Thu, 4 Aug 2005 12:02:55 +0200 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1879195.HvZg0fXr1g"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508041202.58684.benoit.panizzon@imp.ch> Subject: FreeBSD iSCSI mapping all LUN to LUN 0 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 10:03:03 -0000 --nextPart1879195.HvZg0fXr1g Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all We run FreeBSD 5.4-Stable and have troubles with the iSCSI Implementation=20 (from May 2005), wich is not yet part of the official Kernel as I was told. It looks like all LUN get Mapped to LUN 0 so that if you have several logic= al=20 disks and try to mount them, all mounts get redirecting to the Disk with LU= N=20 0 causing severe data corruption (and FreeBSD to crash after a while). The funny thing is, that you can also access non existent LUN's (as they to= o=20 are mapped to LUN 0) I was not able to find any FreeBSD iSCSI Project Website where I could find= =20 additional information or check out for newer releases or fixes. Linux with Open-iSCSI and Kernel >=3D 2.6.12 has no problem at all detectin= g and=20 accessing the right LUN's. Regards =2D-=20 Beno=EEt Panizzon, =2D----------------------------------------------------------------------- ImproWare AG, UNIXSP & ISP Phone: +41 61 826 93 00 Kabelinternet-Hotline: +41 61 826 93 07 Zurlindenstrasse 29 Fax: +41 61 826 93 01 CH-4133 Pratteln Net: http://www.imp.ch/ =2D----------------------------------------------------------------------- --nextPart1879195.HvZg0fXr1g Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBC8efSCVq2G/yL7/ARAiubAJ9uz1ReamyjCYqb2juTEgGgrt/V4QCfRWzv ccbQ4HWnrJx29DvWaCt6yLo= =+j4x -----END PGP MESSAGE----- --nextPart1879195.HvZg0fXr1g-- From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 4 13:43:38 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 B707A16A420 for ; Thu, 4 Aug 2005 13:43:38 +0000 (GMT) (envelope-from dmitry_yus@yahoo.com) Received: from smtp018.mail.yahoo.com (smtp018.mail.yahoo.com [216.136.174.115]) by mx1.FreeBSD.org (Postfix) with SMTP id 956DB43D55 for ; Thu, 4 Aug 2005 13:43:35 +0000 (GMT) (envelope-from dmitry_yus@yahoo.com) Received: (qmail 22684 invoked from network); 4 Aug 2005 13:43:35 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=aM2kkUvW1CkrYtrnEfIQhp3HKNzv351l9+RtQ96j5fy2me937NQvV2E9wGk3aPv2cqCWmjDUDgktoGPmbbEUohDbcXGQcXJtnEBxNlfa905aXSDu+KPQ2g2wQLpIswDDUs3OgtN7QxcxHlgriQAuCtdwoxuUAkcsye1B8R1HLEk= ; Received: from unknown (HELO ?172.10.7.7?) (dmitry?yus@24.7.114.77 with plain) by smtp018.mail.yahoo.com with SMTP; 4 Aug 2005 13:43:35 -0000 From: Dmitry Yusupov To: Benoit Panizzon In-Reply-To: <200508041202.58684.benoit.panizzon@imp.ch> References: <200508041202.58684.benoit.panizzon@imp.ch> Content-Type: text/plain Date: Thu, 04 Aug 2005 06:43:04 -0700 Message-Id: <1123162984.16724.3.camel@mylaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-8) Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: FreeBSD iSCSI mapping all LUN to LUN 0 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 13:43:38 -0000 On Thu, 2005-08-04 at 12:02 +0200, Benoit Panizzon wrote: > Hi all > > We run FreeBSD 5.4-Stable and have troubles with the iSCSI Implementation > (from May 2005), wich is not yet part of the official Kernel as I was told. > > It looks like all LUN get Mapped to LUN 0 so that if you have several logical > disks and try to mount them, all mounts get redirecting to the Disk with LUN > 0 causing severe data corruption (and FreeBSD to crash after a while). > > The funny thing is, that you can also access non existent LUN's (as they too > are mapped to LUN 0) > > I was not able to find any FreeBSD iSCSI Project Website where I could find > additional information or check out for newer releases or fixes. > > Linux with Open-iSCSI and Kernel >= 2.6.12 has no problem at all detecting and > accessing the right LUN's. There was some plans to merge FreeBSD kernel's part into open-iscsi project. The problem, open-iscsi needs to resolve is to re-license some part of it under dual-license, so GPL and others will co-exist. Some work been done for initial integration, but recently I don't have much time to continue this effort. So, if somebody interesting, please let me know. We've discussed dual-licensing with core open-iscsi developers, there should not be a problem it will just take some time to get agreement from all copyright holders. Dima From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 4 22:18:09 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 0AE3A16A41F for ; Thu, 4 Aug 2005 22:18:09 +0000 (GMT) (envelope-from guille@supernodo.com) Received: from smtp.supernodo.com (host66.200-82-52.telecom.net.ar [200.82.52.66]) by mx1.FreeBSD.org (Postfix) with SMTP id 5A1CC43D45 for ; Thu, 4 Aug 2005 22:18:02 +0000 (GMT) (envelope-from guille@supernodo.com) Received: (qmail 9140 invoked by uid 1001); 4 Aug 2005 22:09:03 -0000 Received: from unknown (HELO Guille) (172.17.50.236) by smtp.supernodo.com with SMTP; 4 Aug 2005 22:09:03 -0000 Message-ID: <000801c59941$79a5cc40$7800a8c0@Guille> From: =?iso-8859-1?Q?Guillermo_Galv=E1n?= To: Date: Thu, 4 Aug 2005 19:11:33 -0300 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Problem scsi Hp Prolian ML110 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:09 -0000 Hi, I have a Hp Prolian ML110 with Freebsd 5.4, with HP 64-bit/133-MHz = Single Channel Ultra320 SCSI=20 My prblem is the transference of date is very slow, i need help thanks. 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 From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 4 23:30:17 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 05EDE16A41F for ; Thu, 4 Aug 2005 23:30:17 +0000 (GMT) (envelope-from ken@nargothrond.kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF1B43D45 for ; Thu, 4 Aug 2005 23:30:14 +0000 (GMT) (envelope-from ken@nargothrond.kdm.org) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.12.11/8.12.11) with ESMTP id j74NUCq3059705; Thu, 4 Aug 2005 17:30:12 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.12.11/8.12.5/Submit) id j74NUCng059704; Thu, 4 Aug 2005 17:30:12 -0600 (MDT) (envelope-from ken) Date: Thu, 4 Aug 2005 17:30:12 -0600 From: "Kenneth D. Merry" To: "Heck, Steve" Message-ID: <20050804233012.GA59646@nargothrond.kdm.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Virus-Scanned: ClamAV 0.86.1/1003/Thu Aug 4 08:43:24 2005 on nargothrond.kdm.org X-Virus-Status: Clean Cc: freebsd-scsi@freebsd.org Subject: Re: [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 23:30:17 -0000 On Thu, Aug 04, 2005 at 18:18:39 -0400, Heck, Steve wrote: > I am having problems Writing to a SCSI tape drive. > > First the Block Size is being set to 65536 Bytes by Mode Select which succeeds. > > printf ("Data compression enabled.\n"); > > buf_data1c[0] = 0x00; > buf_data1c[1] = 0x00; > buf_data1c[2] = 0x10; > buf_data1c[3] = 0x08; > buf_data1c[4] = 0x7f; > buf_data1c[5] = 0x00; > buf_data1c[6] = 0x00; > buf_data1c[7] = 0x00; > buf_data1c[8] = 0x00; > buf_data1c[9] = 0x01; > buf_data1c[10] = 0x00; > buf_data1c[11] = 0x00; > buf_data1c[12] = 0x0f; > buf_data1c[13] = 0x0e; > buf_data1c[14] = 0xc0; > buf_data1c[15] = 0x80; > buf_data1c[16] = 0x00; > buf_data1c[17] = 0x00; > buf_data1c[18] = 0x00; > buf_data1c[19] = 0x00; > buf_data1c[20] = 0x00; > buf_data1c[21] = 0x00; > buf_data1c[22] = 0x00; > buf_data1c[23] = 0x00; > buf_data1c[24] = 0x00; > buf_data1c[25] = 0x00; > buf_data1c[26] = 0x00; > buf_data1c[27] = 0x00; > > //unsigned char header[len]; > memset( header, 0, len ); > memset(&ccb,0,sizeof(ccb)); > ccb.ccb_h.path_id = cam->path_id; > ccb.ccb_h.target_id = cam->target_id; > ccb.ccb_h.target_lun = 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 = 6; > ccb.csio.cdb_io.cdb_bytes[0] = 0x15; // Mode Select > ccb.csio.cdb_io.cdb_bytes[1] = 0x10; > ccb.csio.cdb_io.cdb_bytes[4] = 0x1c; > ccb.csio.cdb_io.cdb_bytes[5] = 0x00; > > //int ret; > if ((ret = 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 = cam->path_id; > ccb.ccb_h.target_id = cam->target_id; > ccb.ccb_h.target_lun = 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 = 6; > ccb.csio.cdb_io.cdb_bytes[0] = 0x0a; // Write > ccb.csio.cdb_io.cdb_bytes[1] = 0x01; > ccb.csio.cdb_io.cdb_bytes[4] = 0x01; > ccb.csio.cdb_io.cdb_bytes[5] = 0x00; > > if ((ret = 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. > > Any help would be appreciated. Here's the comment/code in question: /* * The userland data pointer passed in may not be page * aligned. vmapbuf() truncates the address to a page * boundary, so if the address isn't page aligned, we'll * need enough space for the given transfer length, plus * whatever extra space is necessary to make it to the page * boundary. */ if ((lengths[i] + (((vm_offset_t)(*data_ptrs[i])) & PAGE_MASK)) > DFLTPHYS){ printf("cam_periph_mapmem: attempt to map %lu bytes, " "which is greater than DFLTPHYS(%d)\n", (long)(lengths[i] + (((vm_offset_t)(*data_ptrs[i])) & PAGE_MASK)), DFLTPHYS); return(E2BIG); } If you make sure your data buffer is page aligned, you should be able to send a 64K request down through the passthrough driver. Ken -- Kenneth Merry ken@FreeBSD.org