From owner-freebsd-scsi@FreeBSD.ORG Sun Mar 21 01:13:04 2004 Return-Path: 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 3CD6116A4CE for ; Sun, 21 Mar 2004 01:13:04 -0800 (PST) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id C938643D1D for ; Sun, 21 Mar 2004 01:13:03 -0800 (PST) (envelope-from mark@markdnet.demon.co.uk) Received: from lizacnet.demon.co.uk ([80.177.208.105] helo=[192.168.0.2]) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1B4z0w-0004Hu-0W for freebsd-scsi@freebsd.org; Sun, 21 Mar 2004 09:13:02 +0000 From: Mark Dixon To: freebsd-scsi@freebsd.org Date: Sun, 21 Mar 2004 09:15:00 +0000 User-Agent: KMail/1.6.1 MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_k0VXAeNH8wrljJ6"; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200403210915.16226.mark@markdnet.demon.co.uk> Subject: Adaptec 19160 and SCA-80 drive X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 09:13:04 -0000 --Boundary-02=_k0VXAeNH8wrljJ6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I've got an Adaptec 19160 and I have connected it to a 9gb SCA-80 drive via= an=20 adaptor which converts it to a 50 pin SCSI device. This works well in Debia= n=20 Linux, and grudgingly in Windows (it seems to take a few seconds longer tha= n=20 it should to figure out whats going on), but FreeBSD really doesn't like it. With Parity on, FreeBSD refuses to boot claiming parity errors on all SCSI = ids=20 on the board (despite there being only one disk attached). It then locks up= =20 attempting to destroy the disk (I presume it doesn't mean that literally). With parity off in dmesg, I get: GEOM: create disk da0 dp=3D0xc3b7b450 da0 at ahc0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-2 device da0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit), Tagged Queueing=20 Enabled da0: 8203MB (16800001 512 byte sectors: 255H 63S/T 1045C) which looks good. Unfortunately, attempting to do anything with the disk, results in the=20 following: lizacnet# bsdlabel -w /dev/da0 bsdlabel: write /dev/da0: Input/output error (da0:ahc0:0:0:0): WRITE(06). CDB: a 0 0 0 10 0 (da0:ahc0:0:0:0): CAM Status: SCSI Status Error (da0:ahc0:0:0:0): SCSI Status: Check Condition (da0:ahc0:0:0:0): ABORTED COMMAND asc:0,0 (da0:ahc0:0:0:0): No additional sense information (da0:ahc0:0:0:0): Retrying Command (per Sense Data) (da0:ahc0:0:0:0): WRITE(06). CDB: a 0 0 0 10 0 (da0:ahc0:0:0:0): CAM Status: SCSI Status Error (da0:ahc0:0:0:0): SCSI Status: Check Condition (da0:ahc0:0:0:0): ABORTED COMMAND asc:0,0 (da0:ahc0:0:0:0): No additional sense information (da0:ahc0:0:0:0): Retrying Command (per Sense Data) (da0:ahc0:0:0:0): WRITE(06). CDB: a 0 0 0 10 0 (da0:ahc0:0:0:0): CAM Status: SCSI Status Error (da0:ahc0:0:0:0): SCSI Status: Check Condition (da0:ahc0:0:0:0): ABORTED COMMAND asc:0,0 (da0:ahc0:0:0:0): No additional sense information (da0:ahc0:0:0:0): Retrying Command (per Sense Data) (da0:ahc0:0:0:0): WRITE(06). CDB: a 0 0 0 10 0 (da0:ahc0:0:0:0): CAM Status: SCSI Status Error (da0:ahc0:0:0:0): SCSI Status: Check Condition (da0:ahc0:0:0:0): ABORTED COMMAND asc:0,0 (da0:ahc0:0:0:0): No additional sense information (da0:ahc0:0:0:0): Retrying Command (per Sense Data) (da0:ahc0:0:0:0): WRITE(06). CDB: a 0 0 0 10 0 (da0:ahc0:0:0:0): CAM Status: SCSI Status Error (da0:ahc0:0:0:0): SCSI Status: Check Condition (da0:ahc0:0:0:0): ABORTED COMMAND asc:0,0 (da0:ahc0:0:0:0): No additional sense information (da0:ahc0:0:0:0): Retries Exhausted Setting kern.geom.debugflags -> 1 gives: g_post_event_x(0xc04ac530, 0xc39fa080, 2) ref 0xc39fa080 mbr_taste(MBR,da0) g_slice_config(da0, 0, 0) g_slice_config(da0, 1, 0) g_slice_config(da0, 2, 0) g_slice_config(da0, 3, 0) g_slice_config(da0, 0, 1) g_post_event_x(0xc04ac530, 0xc3caf700, 2) ref 0xc3caf700 g_slice_config(da0, 1, 1) g_slice_config(da0, 2, 1) g_slice_config(da0, 3, 1) bsd_taste(BSD,da0) g_slice_spoiled(0xc473fe00/da0) g_wither_geom(0xc3bacb80(da0)) g_detach(0xc473fe00) g_destroy_consumer(0xc473fe00) g_destroy_geom(0xc3bacb80(da0)) g_mbrext_taste(MBREXT,da0) mbr_taste(MBR,da0s1) g_slice_spoiled(0xc473f300/da0s1) g_wither_geom(0xc3d6d680(da0s1)) g_detach(0xc473f300) g_destroy_consumer(0xc473f300) g_destroy_geom(0xc3d6d680(da0s1)) bsd_taste(BSD,da0s1) g_slice_spoiled(0xc439d940/da0s1) g_wither_geom(0xc41e5d00(da0s1)) g_detach(0xc439d940) g_destroy_consumer(0xc439d940) g_destroy_geom(0xc41e5d00(da0s1)) dev_taste(DEV,da0s1) g_mbrext_taste(MBREXT,da0s1) g_slice_spoiled(0xc473f4c0/da0s1) g_wither_geom(0xc41e5100(da0s1)) g_detach(0xc473f4c0) g_destroy_consumer(0xc473f4c0) g_destroy_geom(0xc41e5100(da0s1)) ahc and ahc_pci are loaded as modules, if that makes any difference. I did = try=20 loading debug versions of the modules and I think I got a panic, but I was = in=20 X at the time and there was no sign of it on reboot. Any ideas whats up? =2D-=20 Mark 'If it compiles, ship it' --Boundary-02=_k0VXAeNH8wrljJ6 Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAXV0kLqgJ90OcaiARAoi4AKCHItbESR3r3w8ljp+zvNGWTCTHDwCeI4Fo +faA4BNbgv/4yhIVWZpg86Y= =S+UW -----END PGP SIGNATURE----- --Boundary-02=_k0VXAeNH8wrljJ6-- From owner-freebsd-scsi@FreeBSD.ORG Sat Mar 20 18:47:32 2004 Return-Path: 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 58B1E16A4CF for ; Sat, 20 Mar 2004 18:47:32 -0800 (PST) Received: from sunlight.wichita.edu (SUNLIGHT.WICHITA.EDU [156.26.1.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20F5B43D3F for ; Sat, 20 Mar 2004 18:47:32 -0800 (PST) (envelope-from mvanjan@wichita.edu) Received: from CONVERSION-DAEMON.sunlight.wichita.edu by sunlight.wichita.edu (PMDF V6.2-X17 #30772) id <0HUW00801NR7Y7@sunlight.wichita.edu> for freebsd-scsi@freebsd.org; Sat, 20 Mar 2004 20:47:31 -0600 (CST) Received: from mahesh (mahesh.engr.wichita.edu [156.26.34.99]) by sunlight.wichita.edu (PMDF V6.2-X17 #30772) with ESMTP id <0HUW008CRNR7GB@sunlight.wichita.edu> for freebsd-scsi@freebsd.org; Sat, 20 Mar 2004 20:47:31 -0600 (CST) Date: Sat, 20 Mar 2004 20:52:39 -0800 From: Mahesh To: freebsd-scsi@freebsd.org Message-id: <011f01c40f00$567659f0$63221a9c@mahesh> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Mailman-Approved-At: Sun, 21 Mar 2004 05:21:53 -0800 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: target driver question X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 02:47:32 -0000 Dear Sir I am working on the master's project and would like to do on Linux fiber channel target emulator.is there source code for this which I can work on ..or download site where I can test. please suggest as to how should I go in implementing this. Will be looking forward for your reply. Mahesh Anjan Graduate Research Assistant http://rmtlab.engr.wichita.edu Wichita State University Tel: (316)978-4415 From owner-freebsd-scsi@FreeBSD.ORG Sun Mar 21 15:50:13 2004 Return-Path: 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 AB22916A4CE for ; Sun, 21 Mar 2004 15:50:13 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.5]) by mx1.FreeBSD.org (Postfix) with SMTP id 6D0AE43D41 for ; Sun, 21 Mar 2004 15:50:13 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 66304 invoked by uid 1002); 21 Mar 2004 23:50:11 -0000 Received: from unknown (HELO ?10.4.1.17?) (64.58.1.252) by smtp.mho.net with SMTP; 21 Mar 2004 23:50:11 -0000 Date: Sun, 21 Mar 2004 16:54:23 -0700 (MST) From: Scott Long X-X-Sender: scottl@pooker.samsco.home To: Mark Dixon In-Reply-To: <200403210915.16226.mark@markdnet.demon.co.uk> Message-ID: <20040321164958.R30715@pooker.samsco.home> References: <200403210915.16226.mark@markdnet.demon.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-scsi@freebsd.org Subject: Re: Adaptec 19160 and SCA-80 drive X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 23:50:13 -0000 On Sun, 21 Mar 2004, Mark Dixon wrote: > Hi, > > I've got an Adaptec 19160 and I have connected it to a 9gb SCA-80 drive via an > adaptor which converts it to a 50 pin SCSI device. This works well in Debian > Linux, and grudgingly in Windows (it seems to take a few seconds longer than > it should to figure out whats going on), but FreeBSD really doesn't like it. > > With Parity on, FreeBSD refuses to boot claiming parity errors on all SCSI ids > on the board (despite there being only one disk attached). It then locks up > attempting to destroy the disk (I presume it doesn't mean that literally). FreeBSD doesn't detect when you've brute-forced a wide drive to a narrow cable. If you are intent on keeping this configuration (which I would really discourage), then you need to jumper the drive to narrow mode and/or go into the SCSI BIOS and set the properties of all targets to be narrow. This works well in linux because we wrote the code to handle this kind of stuff (called Domain Validation) last year. Unfortunately, we haven't had time to port it to FreeBSD. Scott From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 22 06:07:52 2004 Return-Path: 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 A133A16A4CE for ; Mon, 22 Mar 2004 06:07:52 -0800 (PST) Received: from web21107.mail.yahoo.com (web21107.mail.yahoo.com [216.136.227.109]) by mx1.FreeBSD.org (Postfix) with SMTP id 7B55143D2F for ; Mon, 22 Mar 2004 06:07:52 -0800 (PST) (envelope-from materribile@yahoo.com) Message-ID: <20040322140752.19812.qmail@web21107.mail.yahoo.com> Received: from [24.228.74.10] by web21107.mail.yahoo.com via HTTP; Mon, 22 Mar 2004 06:07:52 PST Date: Mon, 22 Mar 2004 06:07:52 -0800 (PST) From: Mark Terribile To: Mahesh , freebsd-scsi@freebsd.org In-Reply-To: <011f01c40f00$567659f0$63221a9c@mahesh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: target driver question X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 14:07:52 -0000 Mahesh, > I am working on the master's project and would like to do on Linux fiber > channel target emulator.is there source code for this which I can work > on ..or download site where I can test. please suggest as to how should > I go in implementing this. The problem with Linux and target mode is that there are at least two parts to a target mode solution. You need the ability to operate the interface card's target mode capabilities, but you also need the SCSI target mode framework from which to operate them. The latter is what Linux lacks, and the direction(s) the Linux developers have chosen for their overall SCSI architecture will make it difficult to create one. Getting it accepted by the guardians of the Linux source tree is a further hurdle, but one that would be a major contribution (IMO), since it would serve the writers of ALL SCSI device drivers. The Linux people have chosen to replace the CAM reference model with something else, and the contribution that CAM makes to FreeBSD's SCSI architecture is not there. Here are some places to start: look at the isp(4) driver, which has (or had) a device interface level shared between Linux and FreeBSD. See how the target mode code works with the FreeBSD target mode facilitiies and then see what is lacking in Linux. I spent over a month trying to make the pieces line up, but you might have more time; I don't know. Google the web and the newsgroups for 'linux scsi target mode' and pick up some of the discussions about the subject. Check out the code from the University of New Hampshire's Interoperability Lab. They are concentrating on iSCSI-over-FC, and neglecting actual SCSI work, but you may pick up some clues. Good luck. I'd be glad to hear how your work turns out. Mark Terribile __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 22 09:06:58 2004 Return-Path: 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 37E8416A4CE for ; Mon, 22 Mar 2004 09:06:58 -0800 (PST) Received: from racket.t2g.ch (adsl-130-141.init7.net [213.144.130.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B5A343D31 for ; Mon, 22 Mar 2004 09:06:57 -0800 (PST) (envelope-from m.senft@t2g.ch) Received: from t2g.ch (dhcp-35.t2g.ch [192.168.5.35]) by racket.t2g.ch (8.12.10/8.12.10) with ESMTP id i2MH5HjH080418 for ; Mon, 22 Mar 2004 18:05:21 +0100 (CET) (envelope-from m.senft@t2g.ch) Message-ID: <405F1D1C.9050005@t2g.ch> Date: Mon, 22 Mar 2004 18:06:36 +0100 From: Marco Senft Organization: Technische Treuhand GmbH User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: de, en, en-us MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No X-Spam-Score: -4.901 () BAYES_00 X-Scanned-By: MIMEDefang 2.39 Subject: Accessing tape drive using passthrough driver X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 17:06:58 -0000 I'm currently using a HP DAT24 tape drive which is working fine when using standard unix tools like mt, tar or dump. Here's the dmesg output concerning the tape drive: ahc1: port 0xe000-0xe0ff mem 0xd8020000-0xd8020fff irq 11 at device 11.0 on pci0 aic7870: Single Channel A, SCSI Id=7, 16/253 SCBs sa0 at ahc1 bus 0 target 6 lun 0 sa0: Removable Sequential Access SCSI-2 device sa0: 10.000MB/s transfers (10.000MHz, offset 15) However, we recently bought a software called "TapeWare" (Version 7) which does not recognize the drive. The technical support of the manufacturer told me that I am "accessing the tape drive currently through ST but this is no way for Tapeware to access the drive." I should use the SG driver instead. This sounds like they're talking of Solaris stuff, and recommended me to "just look at your OS documentation on how to load up SG vs ST". If I understand this correctly, these drivers are called "sa" and "pass" in the FreeBSD world. I'm using the GENERIC 4.7-RELEASE kernel currently, which is compiled with both the "sa" and the "pass" devices. There are some "pass" devices under /dev: > ls -la /dev/pass* crw------- 1 root operator 31, 0 Oct 21 2002 pass0 crw------- 1 root operator 31, 1 Oct 21 2002 pass1 crw------- 1 root operator 31, 2 Oct 21 2002 pass2 crw------- 1 root operator 31, 3 Oct 21 2002 pass3 I have four hard drives attached to the first controller, don't know if this has any influence on the list above. So if someone just could tell me if and how I can make sure that the tape drive is accessible using the "pass" driver, I'd be really happy. Cheers, marco -- Marco Senft Technische Treuhand GmbH http://www.t2g.ch/ From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 22 10:07:24 2004 Return-Path: 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 2A6F616A4CE for ; Mon, 22 Mar 2004 10:07:24 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05E6B43D2D for ; Mon, 22 Mar 2004 10:07:23 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.9/8.12.5) with ESMTP id i2MI7JLX046987; Mon, 22 Mar 2004 11:07:19 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.9/8.12.5/Submit) id i2MI7J17046986; Mon, 22 Mar 2004 11:07:19 -0700 (MST) (envelope-from ken) Date: Mon, 22 Mar 2004 11:07:19 -0700 From: "Kenneth D. Merry" To: Marco Senft Message-ID: <20040322180718.GA46814@panzer.kdm.org> References: <405F1D1C.9050005@t2g.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405F1D1C.9050005@t2g.ch> User-Agent: Mutt/1.4.1i cc: freebsd-scsi@freebsd.org Subject: Re: Accessing tape drive using passthrough driver X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 18:07:24 -0000 On Mon, Mar 22, 2004 at 18:06:36 +0100, Marco Senft wrote: > I'm currently using a HP DAT24 tape drive which is working fine when > using standard unix tools like mt, tar or dump. Here's the dmesg output > concerning the tape drive: > > ahc1: port 0xe000-0xe0ff mem > 0xd8020000-0xd8020fff irq 11 at device 11.0 on pci0 > aic7870: Single Channel A, SCSI Id=7, 16/253 SCBs > sa0 at ahc1 bus 0 target 6 lun 0 > sa0: Removable Sequential Access SCSI-2 device > sa0: 10.000MB/s transfers (10.000MHz, offset 15) > > However, we recently bought a software called "TapeWare" (Version 7) > which does not recognize the drive. The technical support of the > manufacturer told me that I am "accessing the tape drive currently > through ST but this is no way for Tapeware to access the drive." I > should use the SG driver instead. This sounds like they're talking of > Solaris stuff, and recommended me to "just look at your OS documentation > on how to load up SG vs ST". > > If I understand this correctly, these drivers are called "sa" and "pass" > in the FreeBSD world. I'm using the GENERIC 4.7-RELEASE kernel > currently, which is compiled with both the "sa" and the "pass" devices. > > There are some "pass" devices under /dev: > > > ls -la /dev/pass* > crw------- 1 root operator 31, 0 Oct 21 2002 pass0 > crw------- 1 root operator 31, 1 Oct 21 2002 pass1 > crw------- 1 root operator 31, 2 Oct 21 2002 pass2 > crw------- 1 root operator 31, 3 Oct 21 2002 pass3 > > I have four hard drives attached to the first controller, don't know if > this has any influence on the list above. > > > So if someone just could tell me if and how I can make sure that the > tape drive is accessible using the "pass" driver, I'd be really happy. Under FreeBSD, most tape comands (mt, tar, dump) talk to the sa(4) driver, which presents a block interface to userland. SCSI passthrough does go through the pass(4) driver, as you've figured out. You can type 'camcontrol devlist' to see which pass(4) driver instance is attached to the tape drive. If you only have those 4 passthrough devices in /dev, you may need to create more. To do that, type: cd /dev sh MAKEDEV pass8 Where 8 is the number of passthrough devices you want to make. (So you'll wind up with pass0 - pass7.) To see if you can talk to your tape drive via the passthrough driver, type: camcontrol tur sa0 -v If you get "Unit is ready" or some SCSI sense information, you can talk to the drive. Otherwise you'll get another error that means you probably need to create the device node. Anyway, that said, the SCSI passthrough interface under FreeBSD is different than the Linux or Windows, so they'll have to support the FreeBSD passthrough interface in order for it to work. They claim FreeBSD support on their web site, so it may work. (It isn't clear whether FreeBSD support is just for backup clients or for the backup server machine as well.) Ken -- Kenneth Merry ken@kdm.org From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 22 10:26:08 2004 Return-Path: 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 3BE9516A4CE for ; Mon, 22 Mar 2004 10:26:08 -0800 (PST) Received: from sift.mirapoint.com (sift.mirapoint.com [63.107.133.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 229CB43D3F for ; Mon, 22 Mar 2004 10:26:08 -0800 (PST) (envelope-from cer@mirapoint.com) Received: from mirapoint.com (nat64.mirapoint.com [63.107.133.64]) by sift.mirapoint.com (MOS 3.4.5-GR) with ESMTP id ANL03643; Mon, 22 Mar 2004 10:25:51 -0800 (PST) Message-ID: <405F2FAF.4050601@mirapoint.com> Date: Mon, 22 Mar 2004 10:25:51 -0800 From: Carl Reisinger User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040315 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marco Senft References: <405F1D1C.9050005@t2g.ch> In-Reply-To: <405F1D1C.9050005@t2g.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-scsi@freebsd.org Subject: Re: Accessing tape drive using passthrough driver X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 18:26:08 -0000 > > There are some "pass" devices under /dev: > > > ls -la /dev/pass* > crw------- 1 root operator 31, 0 Oct 21 2002 pass0 > crw------- 1 root operator 31, 1 Oct 21 2002 pass1 > crw------- 1 root operator 31, 2 Oct 21 2002 pass2 > crw------- 1 root operator 31, 3 Oct 21 2002 pass3 > > I have four hard drives attached to the first controller, don't know > if this has any influence on the list above. > > > So if someone just could tell me if and how I can make sure that the > tape drive is accessible using the "pass" driver, I'd be really happy. > try running "camcontrol devlist -v" as part of that output will be the pass device for each unit found. If the pass device associated with the tape device does not exist, create it and try TapeWare again. From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 22 14:35:42 2004 Return-Path: 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 28E3416A4CF for ; Mon, 22 Mar 2004 14:35:42 -0800 (PST) Received: from racket.t2g.ch (adsl-130-141.init7.net [213.144.130.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7906F43D45 for ; Mon, 22 Mar 2004 14:35:40 -0800 (PST) (envelope-from m.senft@t2g.ch) Received: from t2g.ch (dhcp-35.t2g.ch [192.168.5.35]) by racket.t2g.ch (8.12.10/8.12.10) with ESMTP id i2MMY2jH081126; Mon, 22 Mar 2004 23:34:02 +0100 (CET) (envelope-from m.senft@t2g.ch) Message-ID: <405F6A2A.90800@t2g.ch> Date: Mon, 22 Mar 2004 23:35:22 +0100 From: Marco Senft Organization: Technische Treuhand GmbH User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: de, en, en-us MIME-Version: 1.0 To: "Kenneth D. Merry" References: <405F1D1C.9050005@t2g.ch> <20040322180718.GA46814@panzer.kdm.org> In-Reply-To: <20040322180718.GA46814@panzer.kdm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No X-Spam-Score: -4.901 () BAYES_00 X-Scanned-By: MIMEDefang 2.39 cc: freebsd-scsi@freebsd.org Subject: Re: Accessing tape drive using passthrough driver X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2004 22:35:42 -0000 Kenneth D. Merry wrote: > Anyway, that said, the SCSI passthrough interface under FreeBSD is > different than the Linux or Windows, so they'll have to support the FreeBSD > passthrough interface in order for it to work. > > They claim FreeBSD support on their web site, so it may work. (It isn't > clear whether FreeBSD support is just for backup clients or for the backup > server machine as well.) TapeWare now fully works as backup server on my FreeBSD 4.7 system as well as client on a 5.2.1 machine (and a bunch of windows and linux clients). I chose TapeWare because it has the broadest range of supported platforms amongst all other software I evaluated, and obviously it even works fully functional on all my FreeBSD systems thanks to your advice. -- Marco Senft Technische Treuhand GmbH http://www.t2g.ch/ From owner-freebsd-scsi@FreeBSD.ORG Mon Mar 22 21:47:05 2004 Return-Path: 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 561DB16A4CE for ; Mon, 22 Mar 2004 21:47:05 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id D319243D3F for ; Mon, 22 Mar 2004 21:47:04 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.9/8.12.5) with ESMTP id i2N5l3LX051025; Mon, 22 Mar 2004 22:47:03 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.9/8.12.5/Submit) id i2N5l3v6051024; Mon, 22 Mar 2004 22:47:03 -0700 (MST) (envelope-from ken) Date: Mon, 22 Mar 2004 22:47:03 -0700 From: "Kenneth D. Merry" To: Mahesh Message-ID: <20040323054703.GA50940@panzer.kdm.org> References: <011f01c40f00$567659f0$63221a9c@mahesh> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <011f01c40f00$567659f0$63221a9c@mahesh> User-Agent: Mutt/1.4.1i cc: freebsd-scsi@freebsd.org Subject: Re: target driver question X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2004 05:47:05 -0000 On Sat, Mar 20, 2004 at 20:52:39 -0800, Mahesh wrote: > Dear Sir > > I am working on the master's project and would like to do on Linux fiber > channel target emulator.is there source code for this which I can work > on ..or download site where I can test. please suggest as to how should > I go in implementing this. My guess is that your master's project is really just something that will use a target emulator, and isn't about how to write one. If so, you'll get something that works reasonably well out of the box with FreeBSD. Linux doesn't offer a whole lot in the way of target emulators. Mark Terribile already pointed out the UNH stuff, which is probably most of what is out there. (The isp(4) driver for Linux does have a very minimal target emulator that I think responds to INQUIRY and a few other things, but that's really most of what it does.) Although it'll depend on the specific goals of your project, using what is already working in FreeBSD might allow you to concentrate on doing your project rather than building the infrastructure for it. Ken -- Kenneth Merry ken@kdm.org From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 24 07:24:32 2004 Return-Path: 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 6401F16A4CE; Wed, 24 Mar 2004 07:24:32 -0800 (PST) Received: from amsfep17-int.chello.nl (amsfep17-int.chello.nl [213.46.243.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1717943D54; Wed, 24 Mar 2004 07:24:31 -0800 (PST) (envelope-from j.molinger@chello.nl) Received: from chello.nl ([213.93.208.17]) by amsfep17-int.chello.nl (InterMail vM.6.00.05.02 201-2115-109-103-20031105) with ESMTP id <20040324152427.YHGF9102.amsfep17-int.chello.nl@chello.nl>; Wed, 24 Mar 2004 16:24:27 +0100 Message-ID: <4061A832.8050105@chello.nl> Date: Wed, 24 Mar 2004 16:24:34 +0100 From: Jeroen Molinger User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Content-Type: multipart/mixed; boundary="------------040602020109060905020503" X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: ServeRAID-6M on x335 with Freebsd 5.2 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2004 15:24:32 -0000 This is a multi-part message in MIME format. --------------040602020109060905020503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On Mon, 22 Mar 2004, yh tan wrote: > Hi Scott, > > Coz i didn't see "Jeroen Molinger >" replying to you > with the pciconf -lv text on the mailing list, so i'm sending you my > copy of "pciconf -lv", please see attached text file. > > Attachment textfile: nas_pciconf.txt > > > cheers, > Yanghwee. >Thanks. We actually corresponded in private over this, and I committed >the required changes to the driver last Friday. Please let me know if you >can update your system and test the changes. > >Scott Hai Scott, I have did a complete new cvs from the source and recompiled a new kernel, still the card isn't recocnized as a ServeRAID 6M I als tried the fix Yangwee proposed earlies, but that also didn't work I wil post my pciconf -lv and the ips drivers I used to recompile. www# pciconf -lv from a IBM 345X running on FreeBSD 5.2.1 with a addon IBM ServeRAID 6M hostb0@pci0:0:0: class=0x060000 card=0x00000000 chip=0x00141166 rev=0x33 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CNB20-HE Host Bridge' class = bridge subclass = HOST-PCI hostb1@pci0:0:1: class=0x060000 card=0x00000000 chip=0x00141166 rev=0x00 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CNB20-HE Host Bridge' class = bridge subclass = HOST-PCI hostb2@pci0:0:2: class=0x060000 card=0x00000000 chip=0x00141166 rev=0x00 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CNB20-HE Host Bridge' class = bridge subclass = HOST-PCI none0@pci0:6:0: class=0x030000 card=0x02401014 chip=0x47521002 rev=0x27 hdr=0x00 vendor = 'ATI Technologies' device = 'Rage XL PCI' class = display subclass = VGA hostb3@pci0:15:0: class=0x060000 card=0x02011166 chip=0x02011166 rev=0x93 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CSB5 PCI to ISA Bridge' class = bridge subclass = HOST-PCI atapci0@pci0:15:1: class=0x010182 card=0x02121166 chip=0x02121166 rev=0x93 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CSB5 PCI EIDE Controller' class = mass storage subclass = ATA ohci0@pci0:15:2: class=0x0c0310 card=0x02201166 chip=0x02201166 rev=0x05 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'OSB4 OpenHCI Compliant USB Controller' class = serial bus subclass = USB isab0@pci0:15:3: class=0x060100 card=0x02301166 chip=0x02251166 rev=0x00 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CSB5 PCI Bridge' class = bridge subclass = PCI-ISA hostb4@pci0:16:0: class=0x060000 card=0x00000000 chip=0x01011166 rev=0x05 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CIOB-X2' class = bridge subclass = HOST-PCI hostb5@pci0:16:2: class=0x060000 card=0x00000000 chip=0x01011166 rev=0x05 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CIOB-X2' class = bridge subclass = HOST-PCI hostb6@pci0:17:0: class=0x060000 card=0x00000000 chip=0x01011166 rev=0x05 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CIOB-X2' class = bridge subclass = HOST-PCI hostb7@pci0:17:2: class=0x060000 card=0x00000000 chip=0x01011166 rev=0x05 hdr=0x00 vendor = 'ServerWorks (Was: Reliance Computer Corp)' device = 'CIOB-X2' class = bridge subclass = HOST-PCI pcib1@pci4:4:0: class=0x060400 card=0x00000080 chip=0x01a71014 rev=0x02 hdr=0x01 vendor = 'International Business Machines Corp.' device = 'IBM 133 PCI-X Bridge R1.1' class = bridge subclass = PCI-PCI none1@pci5:8:0: class=0x010400 card=0x02791014 chip=0x02509005 rev=0x02 hdr=0x00 vendor = 'Adaptec' class = mass storage subclass = RAID em0@pci6:8:0: class=0x020000 card=0x027c1014 chip=0x10108086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82546EB Gigabit Ethernet Controller (copper)' class = network subclass = ethernet em1@pci6:8:1: class=0x020000 card=0x027c1014 chip=0x10108086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = '82546EB Gigabit Ethernet Controller (copper)' class = network subclass = ethernet mpt0@pci8:7:0: class=0x010000 card=0x026c1014 chip=0x00301000 rev=0x07 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' device = 'LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller' class = mass storage subclass = SCSI mpt1@pci8:7:1: class=0x010000 card=0x026c1014 chip=0x00301000 rev=0x07 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' device = 'LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller' class = mass storage subclass = SCSI I have included the ips driver directory . What to do ? regards Jeroen --------------040602020109060905020503-- From owner-freebsd-scsi@FreeBSD.ORG Wed Mar 24 07:32:58 2004 Return-Path: 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 7AC6916A4CE for ; Wed, 24 Mar 2004 07:32:58 -0800 (PST) Received: from amsfep18-int.chello.nl (amsfep18-int.chello.nl [213.46.243.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EDAC43D46 for ; Wed, 24 Mar 2004 07:32:57 -0800 (PST) (envelope-from j.molinger@chello.nl) Received: from chello.nl ([213.93.208.17]) by amsfep18-int.chello.nl (InterMail vM.6.00.05.02 201-2115-109-103-20031105) with ESMTP id <20040324153255.KJEY8742.amsfep18-int.chello.nl@chello.nl> for ; Wed, 24 Mar 2004 16:32:55 +0100 Message-ID: <4061AA2E.4070602@chello.nl> Date: Wed, 24 Mar 2004 16:33:02 +0100 From: Jeroen Molinger User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <4061A832.8050105@chello.nl> In-Reply-To: <4061A832.8050105@chello.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ServeRAID-6M on x335 with Freebsd 5.2 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2004 15:32:58 -0000 Part 2: The ips.h file new version * $FreeBSD: src/sys/dev/ips/ips.h,v 1.5 2003/11/27 08:37:36 mbr Exp $ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* * IPS CONSTANTS */ #define IPS_VENDOR_ID 0x1014 #define IPS_MORPHEUS_DEVICE_ID 0x01BD #define IPS_COPPERHEAD_DEVICE_ID 0x002E #define IPS_CSL 0xff #define IPS_POCL 0x30 /* amounts of memory to allocate for certain commands */ #define IPS_ADAPTER_INFO_LEN (sizeof(ips_adapter_info_t)) #define IPS_DRIVE_INFO_LEN (sizeof(ips_drive_info_t)) #define IPS_COMMAND_LEN 24 #define IPS_MAX_SG_LEN (sizeof(ips_sg_element_t) * IPS_MAX_SG_ELEMENTS) #define IPS_NVRAM_PAGE_SIZE 128 /* various flags */ #define IPS_NOWAIT_FLAG 1 /* states for the card to be in */ #define IPS_DEV_OPEN 0x01 #define IPS_TIMEOUT 0x02 /* command time out, need reset */ #define IPS_OFFLINE 0x04 /* can't reset card/card failure */ /* max number of commands set to something low for now */ #define IPS_MAX_CMD_NUM 128 #define IPS_MAX_NUM_DRIVES 8 #define IPS_MAX_SG_ELEMENTS 32 #define IPS_MAX_IOBUF_SIZE (64 * 1024) #define IPS_BLKSIZE 512 /* logical drive states */ #define IPS_LD_OFFLINE 0x02 #define IPS_LD_OKAY 0x03 #define IPS_LD_DEGRADED 0x04 #define IPS_LD_FREE 0x00 #define IPS_LD_SYS 0x06 #define IPS_LD_CRS 0x24 /* register offsets */ #define MORPHEUS_REG_OMR0 0x0018 /* Outbound Msg. Reg. 0 */ #define MORPHEUS_REG_OMR1 0x001C /* Outbound Msg. Reg. 1 */ #define MORPHEUS_REG_IDR 0x0020 /* Inbound Doorbell Reg. */ #define MORPHEUS_REG_IISR 0x0024 /* Inbound IRQ Status Reg. */ #define MORPHEUS_REG_IIMR 0x0028 /* Inbound IRQ Mask Reg. */ #define MORPHEUS_REG_OISR 0x0030 /* Outbound IRQ Status Reg. */ #define MORPHEUS_REG_OIMR 0x0034 /* Outbound IRQ Status Reg. */ #define MORPHEUS_REG_IQPR 0x0040 /* Inbound Queue Port Reg. */ #define MORPHEUS_REG_OQPR 0x0044 /* Outbound Queue Port Reg. */ #define COPPER_REG_SCPR 0x05 /* Subsystem Ctrl. Port Reg. */ #define COPPER_REG_ISPR 0x06 /* IRQ Status Port Reg. */ #define COPPER_REG_CBSP 0x07 /* ? Reg. */ #define COPPER_REG_HISR 0x08 /* Host IRQ Status Reg. */ #define COPPER_REG_CCSAR 0x10 /* Cmd. Channel Sys Addr Reg.*/ #define COPPER_REG_CCCR 0x14 /* Cmd. Channel Ctrl. Reg. */ #define COPPER_REG_SQHR 0x20 /* Status Queue Head Reg. */ #define COPPER_REG_SQTR 0x24 /* Status Queue Tail Reg. */ #define COPPER_REG_SQER 0x28 /* Status Queue End Reg. */ #define COPPER_REG_SQSR 0x2C /* Status Queue Start Reg. */ /* bit definitions */ #define MORPHEUS_BIT_POST1 0x01 #define MORPHEUS_BIT_POST2 0x02 #define MORPHEUS_BIT_CMD_IRQ 0x08 #define COPPER_CMD_START 0x101A #define COPPER_SEM_BIT 0x08 #define COPPER_EI_BIT 0x80 #define COPPER_EBM_BIT 0x02 #define COPPER_RESET_BIT 0x80 #define COPPER_GHI_BIT 0x04 #define COPPER_SCE_BIT 0x01 #define COPPER_OP_BIT 0x01 #define COPPER_ILE_BIT 0x10 /* status defines */ #define IPS_POST1_OK 0x8000 #define IPS_POST2_OK 0x000f /* command op codes */ #define IPS_READ_CMD 0x02 #define IPS_WRITE_CMD 0x03 #define IPS_ADAPTER_INFO_CMD 0x05 #define IPS_CACHE_FLUSH_CMD 0x0A #define IPS_REBUILD_STATUS_CMD 0x0C #define IPS_ERROR_TABLE_CMD 0x17 #define IPS_DRIVE_INFO_CMD 0x19 #define IPS_SUBSYS_PARAM_CMD 0x40 #define IPS_CONFIG_SYNC_CMD 0x58 #define IPS_SG_READ_CMD 0x82 #define IPS_SG_WRITE_CMD 0x83 #define IPS_RW_NVRAM_CMD 0xBC #define IPS_FFDC_CMD 0xD7 /* error information returned by the adapter */ #define IPS_MIN_ERROR 0x02 #define IPS_ERROR_STATUS 0x13000200 /* ahh, magic numbers */ #define IPS_OS_FREEBSD 8 #define IPS_VERSION_MAJOR "0.90" #define IPS_VERSION_MINOR ".10" /* Adapter Types */ #define IPS_ADAPTER_COPPERHEAD 0x01 #define IPS_ADAPTER_COPPERHEAD2 0x02 #define IPS_ADAPTER_COPPERHEADOB1 0x03 #define IPS_ADAPTER_COPPERHEADOB2 0x04 #define IPS_ADAPTER_CLARINET 0x05 #define IPS_ADAPTER_CLARINETLITE 0x06 #define IPS_ADAPTER_TROMBONE 0x07 #define IPS_ADAPTER_MORPHEUS 0x08 #define IPS_ADAPTER_MORPHEUSLITE 0x09 #define IPS_ADAPTER_NEO 0x0A #define IPS_ADAPTER_NEOLITE 0x0B #define IPS_ADAPTER_SARASOTA2 0x0C #define IPS_ADAPTER_SARASOTA1 0x0D #define IPS_ADAPTER_MARCO 0x0E #define IPS_ADAPTER_SEBRING 0x0F #define IPS_ADAPTER_MAX_T IPS_ADAPTER_SEBRING /* values for ffdc_settime (from gmtime) */ #define IPS_SECSPERMIN 60 #define IPS_MINSPERHOUR 60 #define IPS_HOURSPERDAY 24 #define IPS_DAYSPERWEEK 7 #define IPS_DAYSPERNYEAR 365 #define IPS_DAYSPERLYEAR 366 #define IPS_SECSPERHOUR (IPS_SECSPERMIN * IPS_MINSPERHOUR) #define IPS_SECSPERDAY ((long) IPS_SECSPERHOUR * IPS_HOURSPERDAY) #define IPS_MONSPERYEAR 12 #define IPS_EPOCH_YEAR 1970 #define IPS_LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400) #define ips_isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) /* * IPS MACROS */ #define ips_read_1(sc,offset) bus_space_read_1(sc->bustag, sc->bushandle, offset) #define ips_read_2(sc,offset) bus_space_read_2(sc->bustag, sc->bushandle, offset) #define ips_read_4(sc,offset) bus_space_read_4(sc->bustag, sc->bushandle, offset) #define ips_write_1(sc,offset,value) bus_space_write_1(sc->bustag, sc->bushandle, offset, value) #define ips_write_2(sc,offset,value) bus_space_write_2(sc->bustag, sc->bushandle, offset, value) #define ips_write_4(sc,offset,value) bus_space_write_4(sc->bustag, sc->bushandle, offset, value) /* this is ugly. It zeros the end elements in an ips_command_t struct starting with the status element */ #define clear_ips_command(command) bzero(&((command)->status), (unsigned long)(&(command)[1])-(unsigned long)&((command)->status)) #define ips_read_request(iobuf) ((iobuf)->bio_cmd == BIO_READ) #define COMMAND_ERROR(status) (((status)->fields.basic_status & 0x0f) >= IPS_MIN_ERROR) #ifndef IPS_DEBUG #define DEVICE_PRINTF(x...) #define PRINTF(x...) #else #define DEVICE_PRINTF(level,x...) if(IPS_DEBUG >= level)device_printf(x) #define PRINTF(level,x...) if(IPS_DEBUG >= level)printf(x) #endif /* * IPS STRUCTS */ struct ips_softc; typedef struct{ u_int8_t command; u_int8_t id; u_int8_t drivenum; u_int8_t reserve2; u_int32_t lba; u_int32_t buffaddr; u_int32_t reserve3; } __attribute__ ((packed)) ips_generic_cmd; typedef struct{ u_int8_t command; u_int8_t id; u_int8_t drivenum; u_int8_t segnum; u_int32_t lba; u_int32_t buffaddr; u_int16_t length; u_int16_t reserve1; } __attribute__ ((packed)) ips_io_cmd; typedef struct{ u_int8_t command; u_int8_t id; u_int8_t pagenum; u_int8_t rw; u_int32_t reserve1; u_int32_t buffaddr; u_int32_t reserve3; } __attribute__ ((packed)) ips_rw_nvram_cmd; typedef struct{ u_int8_t command; u_int8_t id; u_int8_t drivenum; u_int8_t reserve1; u_int32_t reserve2; u_int32_t buffaddr; u_int32_t reserve3; } __attribute__ ((packed)) ips_drive_cmd; typedef struct{ u_int8_t command; u_int8_t id; u_int8_t reserve1; u_int8_t commandtype; u_int32_t reserve2; u_int32_t buffaddr; u_int32_t reserve3; } __attribute__((packed)) ips_adapter_info_cmd; typedef struct{ u_int8_t command; u_int8_t id; u_int8_t reset_count; u_int8_t reset_type; u_int8_t second; u_int8_t minute; u_int8_t hour; u_int8_t day; u_int8_t reserve1[4]; u_int8_t month; u_int8_t yearH; u_int8_t yearL; u_int8_t reserve2; } __attribute__((packed)) ips_adapter_ffdc_cmd; typedef union{ ips_generic_cmd generic_cmd; ips_drive_cmd drive_cmd; ips_adapter_info_cmd adapter_info_cmd; } ips_cmd_buff_t; typedef struct { u_int32_t signature; u_int8_t reserved; u_int8_t adapter_slot; u_int16_t adapter_type; u_int8_t bios_high[4]; u_int8_t bios_low[4]; u_int16_t reserve2; u_int8_t reserve3; u_int8_t operating_system; u_int8_t driver_high[4]; u_int8_t driver_low[4]; u_int8_t reserve4[100]; }__attribute__((packed)) ips_nvram_page5; typedef struct{ u_int32_t addr; u_int32_t len; } ips_sg_element_t; typedef struct{ u_int8_t drivenum; u_int8_t merge_id; u_int8_t raid_lvl; u_int8_t state; u_int32_t sector_count; } __attribute__((packed)) ips_drive_t; typedef struct{ u_int8_t drivecount; u_int8_t reserve1; u_int16_t reserve2; ips_drive_t drives[IPS_MAX_NUM_DRIVES]; }__attribute__((packed)) ips_drive_info_t; typedef struct{ u_int8_t drivecount; u_int8_t miscflags; u_int8_t SLTflags; u_int8_t BSTflags; u_int8_t pwr_chg_count; u_int8_t wrong_addr_count; u_int8_t unident_count; u_int8_t nvram_dev_chg_count; u_int8_t codeblock_version[8]; u_int8_t bootblock_version[8]; u_int32_t drive_sector_count[IPS_MAX_NUM_DRIVES]; u_int8_t max_concurrent_cmds; u_int8_t max_phys_devices; u_int16_t flash_prog_count; u_int8_t defunct_disks; u_int8_t rebuildflags; u_int8_t offline_drivecount; u_int8_t critical_drivecount; u_int16_t config_update_count; u_int8_t blockedflags; u_int8_t psdn_error; u_int16_t addr_dead_disk[4*16];/* ugly, max # channels * max # scsi devices per channel */ }__attribute__((packed)) ips_adapter_info_t; typedef struct { u_int32_t status[IPS_MAX_CMD_NUM]; u_int32_t base_phys_addr; int nextstatus; bus_dma_tag_t dmatag; bus_dmamap_t dmamap; } ips_copper_queue_t; typedef union { struct { u_int8_t reserved; u_int8_t command_id; u_int8_t basic_status; u_int8_t extended_status; } fields; volatile u_int32_t value; } ips_cmd_status_t; /* used to keep track of current commands to the card */ typedef struct ips_command{ u_int8_t command_number; u_int8_t id; u_int8_t timeout; struct ips_softc * sc; bus_dmamap_t command_dmamap; void * command_buffer; u_int32_t command_phys_addr;/*WARNING! must be changed if 64bit addressing ever used*/ ips_cmd_status_t status; SLIST_ENTRY(ips_command) next; bus_dma_tag_t data_dmatag; bus_dmamap_t data_dmamap; void * data_buffer; void * arg; void (* callback)(struct ips_command *command); }ips_command_t; typedef struct ips_wait_list{ STAILQ_ENTRY(ips_wait_list) next; void *data; int (* callback)(ips_command_t *command); }ips_wait_list_t; typedef struct ips_softc{ struct resource * iores; struct resource * irqres; struct intr_config_hook ips_ich; int configured; int state; int iotype; int rid; int irqrid; void * irqcookie; bus_space_tag_t bustag; bus_space_handle_t bushandle; bus_dma_tag_t adapter_dmatag; bus_dma_tag_t command_dmatag; bus_dma_tag_t sg_dmatag; device_t dev; dev_t device_file; struct callout_handle timer; u_int16_t adapter_type; ips_adapter_info_t adapter_info; device_t diskdev[IPS_MAX_NUM_DRIVES]; ips_drive_t drives[IPS_MAX_NUM_DRIVES]; u_int8_t drivecount; u_int16_t ffdc_resetcount; struct timeval ffdc_resettime; u_int8_t next_drive; u_int8_t max_cmds; volatile u_int8_t used_commands; ips_command_t commandarray[IPS_MAX_CMD_NUM]; SLIST_HEAD(command_list, ips_command) free_cmd_list; STAILQ_HEAD(command_wait_list,ips_wait_list) cmd_wait_list; int (* ips_adapter_reinit)(struct ips_softc *sc, int force); void (* ips_adapter_intr)(void *sc); void (* ips_issue_cmd)(ips_command_t *command); ips_copper_queue_t * copper_queue; struct mtx cmd_mtx; }ips_softc_t; /* function defines from ips_ioctl.c */ extern int ips_ioctl_request(ips_softc_t *sc, u_long ioctl_cmd, caddr_t addr, int32_t flags); /* function defines from ips_disk.c */ extern void ipsd_finish(struct bio *iobuf); /* function defines from ips_commands.c */ extern int ips_flush_cache(ips_softc_t *sc); extern void ips_start_io_request(ips_softc_t *sc, struct bio *iobuf); extern int ips_get_drive_info(ips_softc_t *sc); extern int ips_get_adapter_info(ips_softc_t *sc); extern int ips_ffdc_reset(ips_softc_t *sc); extern int ips_update_nvram(ips_softc_t *sc); extern int ips_clear_adapter(ips_softc_t *sc); /* function defines from ips.c */ extern int ips_get_free_cmd(ips_softc_t *sc, int (*callback)(ips_command_t *), void *data, unsigned long flags); extern void ips_insert_free_cmd(ips_softc_t *sc, ips_command_t *command); extern int ips_adapter_init(ips_softc_t *sc); extern int ips_morpheus_reinit(ips_softc_t *sc, int force); extern int ips_adapter_free(ips_softc_t *sc); extern void ips_morpheus_intr(void *sc); extern void ips_issue_morpheus_cmd(ips_command_t *command); extern int ips_copperhead_reinit(ips_softc_t *sc, int force); extern void ips_copperhead_intr(void *sc); extern void ips_issue_copperhead_cmd(ips_command_t *command); Jeroen Molinger wrote: > On Mon, 22 Mar 2004, yh tan wrote: > > Hi Scott, > > > > Coz i didn't see "Jeroen Molinger >" > replying to you > > with the pciconf -lv text on the mailing list, so i'm sending you my > > copy of "pciconf -lv", please see attached text file. > > > > Attachment textfile: nas_pciconf.txt > > > > > > cheers, > > Yanghwee. > > >Thanks. We actually corresponded in private over this, and I committed > >the required changes to the driver last Friday. Please let me know if > you > >can update your system and test the changes. > > > >Scott > > > Hai Scott, > > I have did a complete new cvs from the source and recompiled a new > kernel, still the card isn't recocnized as a ServeRAID 6M > I als tried the fix Yangwee proposed earlies, but that also didn't work > I wil post my pciconf -lv and the ips drivers I used to recompile. > > www# pciconf -lv from a IBM 345X running on FreeBSD 5.2.1 with a addon > IBM ServeRAID 6M > > hostb0@pci0:0:0: class=0x060000 card=0x00000000 chip=0x00141166 > rev=0x33 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CNB20-HE Host Bridge' > class = bridge > subclass = HOST-PCI > hostb1@pci0:0:1: class=0x060000 card=0x00000000 chip=0x00141166 > rev=0x00 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CNB20-HE Host Bridge' > class = bridge > subclass = HOST-PCI > hostb2@pci0:0:2: class=0x060000 card=0x00000000 chip=0x00141166 > rev=0x00 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CNB20-HE Host Bridge' > class = bridge > subclass = HOST-PCI > none0@pci0:6:0: class=0x030000 card=0x02401014 chip=0x47521002 > rev=0x27 hdr=0x00 > vendor = 'ATI Technologies' > device = 'Rage XL PCI' > class = display > subclass = VGA > hostb3@pci0:15:0: class=0x060000 card=0x02011166 chip=0x02011166 > rev=0x93 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CSB5 PCI to ISA Bridge' > class = bridge > subclass = HOST-PCI > atapci0@pci0:15:1: class=0x010182 card=0x02121166 chip=0x02121166 > rev=0x93 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CSB5 PCI EIDE Controller' > class = mass storage > subclass = ATA > ohci0@pci0:15:2: class=0x0c0310 card=0x02201166 chip=0x02201166 > rev=0x05 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'OSB4 OpenHCI Compliant USB Controller' > class = serial bus > subclass = USB > isab0@pci0:15:3: class=0x060100 card=0x02301166 chip=0x02251166 > rev=0x00 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CSB5 PCI Bridge' > class = bridge > subclass = PCI-ISA > hostb4@pci0:16:0: class=0x060000 card=0x00000000 chip=0x01011166 > rev=0x05 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CIOB-X2' > class = bridge > subclass = HOST-PCI > hostb5@pci0:16:2: class=0x060000 card=0x00000000 chip=0x01011166 > rev=0x05 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CIOB-X2' > class = bridge > subclass = HOST-PCI > hostb6@pci0:17:0: class=0x060000 card=0x00000000 chip=0x01011166 > rev=0x05 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CIOB-X2' > class = bridge > subclass = HOST-PCI > hostb7@pci0:17:2: class=0x060000 card=0x00000000 chip=0x01011166 > rev=0x05 > hdr=0x00 > vendor = 'ServerWorks (Was: Reliance Computer Corp)' > device = 'CIOB-X2' > class = bridge > subclass = HOST-PCI > pcib1@pci4:4:0: class=0x060400 card=0x00000080 chip=0x01a71014 > rev=0x02 hdr=0x01 > vendor = 'International Business Machines Corp.' > device = 'IBM 133 PCI-X Bridge R1.1' > class = bridge > subclass = PCI-PCI > none1@pci5:8:0: class=0x010400 card=0x02791014 chip=0x02509005 > rev=0x02 hdr=0x00 > vendor = 'Adaptec' > class = mass storage > subclass = RAID > em0@pci6:8:0: class=0x020000 card=0x027c1014 chip=0x10108086 > rev=0x01 hdr=0x00 > vendor = 'Intel Corporation' > device = '82546EB Gigabit Ethernet Controller (copper)' > class = network > subclass = ethernet > em1@pci6:8:1: class=0x020000 card=0x027c1014 chip=0x10108086 > rev=0x01 hdr=0x00 > vendor = 'Intel Corporation' > device = '82546EB Gigabit Ethernet Controller (copper)' > class = network > subclass = ethernet > mpt0@pci8:7:0: class=0x010000 card=0x026c1014 chip=0x00301000 > rev=0x07 hdr=0x00 > vendor = 'LSI Logic (Was: Symbios Logic, NCR)' > device = 'LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller' > class = mass storage > subclass = SCSI > mpt1@pci8:7:1: class=0x010000 card=0x026c1014 chip=0x00301000 > rev=0x07 hdr=0x00 > vendor = 'LSI Logic (Was: Symbios Logic, NCR)' > device = 'LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller' > class = mass storage > subclass = SCSI > > I have included the ips driver directory . > > What to do ? > > regards > > Jeroen > >------------------------------------------------------------------------ > >_______________________________________________ >freebsd-scsi@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-scsi >To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > > From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 25 12:20:48 2004 Return-Path: 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 0C47816A4CF for ; Thu, 25 Mar 2004 12:20:48 -0800 (PST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id D283043D45 for ; Thu, 25 Mar 2004 12:20:47 -0800 (PST) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id B96573D31 for ; Thu, 25 Mar 2004 15:20:46 -0500 (EST) From: "Dan Langille" To: freebsd-scsi@freebsd.org Date: Thu, 25 Mar 2004 15:20:46 -0500 MIME-Version: 1.0 Message-ID: <4062F8CE.28050.61BF4D50@localhost> Priority: normal X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: Adaptect 2940 dumps X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2004 20:20:48 -0000 Have a look at http://sial.org/pbot/1578 The card is: ahc0: port 0xe000-0xe0ff mem 0xdb000000- 0xdb000fff irq 11 at device 9.0 on pci0 On a 4.9-STABLE box. Any idea why this is occurring? Thank you -- Dan Langille : http://www.langille.org/ BSDCan - http://www.bsdcan.org/ From owner-freebsd-scsi@FreeBSD.ORG Thu Mar 25 14:06:09 2004 Return-Path: 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 9F3B516A4CE for ; Thu, 25 Mar 2004 14:06:09 -0800 (PST) Received: from web21106.mail.yahoo.com (web21106.mail.yahoo.com [216.136.227.108]) by mx1.FreeBSD.org (Postfix) with SMTP id 4E8F643D46 for ; Thu, 25 Mar 2004 14:06:09 -0800 (PST) (envelope-from materribile@yahoo.com) Message-ID: <20040325220608.63090.qmail@web21106.mail.yahoo.com> Received: from [64.19.133.100] by web21106.mail.yahoo.com via HTTP; Thu, 25 Mar 2004 14:06:08 PST Date: Thu, 25 Mar 2004 14:06:08 -0800 (PST) From: Mark Terribile To: Dan Langille , freebsd-scsi@freebsd.org In-Reply-To: <4062F8CE.28050.61BF4D50@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Adaptect 2940 dumps X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2004 22:06:09 -0000 Dan, > Have a look at http://sial.org/pbot/1578 > > The card is: > > ahc0: port 0xe000-0xe0ff mem 0xdb000000- > 0xdb000fff irq 11 at device 9.0 on pci0 > > On a 4.9-STABLE box. The beginning and end of the message sequence look similar to the messages on a cabling problem I saw a couple of years ago on FreeBSD 4.3 . Apparently the combination of excess cable and some bends in our cable produced reflections that messed up the signals. Whether that applies here, I don't know. Mark Terribile __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html