From owner-freebsd-scsi Sun Jun 23 23:29:43 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA27631 for freebsd-scsi-outgoing; Sun, 23 Jun 1996 23:29:43 -0700 (PDT) Received: from hslrswi.hasler.ascom.ch (hslrswi.hasler.ascom.ch [139.79.129.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA27616 for ; Sun, 23 Jun 1996 23:29:18 -0700 (PDT) Received: from autelca.ascom.ch by hslrswi.hasler.ascom.ch (8.7.1/6.33) id IAA21028; Mon, 24 Jun 1996 08:26:03 +0200 (MET DST) Received: from case2.autelca.ascom.ch by autelca.ascom.ch (4.1/SMI-4.1) id AA06660; Mon, 24 Jun 96 08:26:01 +0200 Received: from case2 (localhost.autelca.ascom.ch) by case2.autelca.ascom.ch (4.1/SMI-4.1) id AA27685; Mon, 24 Jun 96 08:25:58 +0200 Message-Id: <31CE34F6.794BDF32@autelca.ascom.ch> Date: Mon, 24 Jun 1996 08:25:58 +0200 From: Norbert Bladt Organization: Ascom Autelca AG, Switzerland X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3 sun4m) Mime-Version: 1.0 To: gwk@cray.com Cc: gilles.tschopp@aletsch.esis.vsnet.ch, scsi@freebsd.org Subject: Re: How to use Syquest EZ-135 as backup drive ? References: <199606201626.SAA05312@racer.dkrz.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Georg-W. Koltermann wrote: > > >>>>> "Gilles" == Gilles Tschopp writes: > Gilles> Hello, I'm an beginner of the Unix world. I would like to > Gilles> know how to manage backup of my FreeBSD system with the > Gilles> TAR command. I have a Syquest EZ-135 plugged on the SCSI > Gilles> subsystem. How to do ? > Gilles> > Gilles> A lot of thanks. > Gilles> > Gilles> Gilles Tschopp. > Gilles> ******************************************* Gilles > Gilles> Tschopp, Informaticien de gestion ES > Gilles> gilles.tschopp@esis.vsnet.ch http://icare.itech.ch > Gilles> http://esis.vsnet.ch http://www.vsnet.ch > Gilles> ******************************************* > Gilles> > Gilles> > > Try > cd /someplace This is OK. > tar cvfb /dev/rst0 126 somefiles This is a bad idea and a wrong answer, too. I think that the EZ-135 is not a tape drive and therefore it is not detected as "rst0" ! Instead it will be some sort of harddisk. Now, the problem is, giving a real step-by-step instruction for a harddisk you don't know the name of, i.e. I can guess that it won't be sd0, but what ? Giving the wrong answer here will destroy the ifnormation on any other disk. OK. Now to my answer: Because the EZ-135 is not a tape drive, tar (Tape ARchive) might not be a good idea to use. Why not just copy the files from your harddisk to this removable disk ? As far as I know, there is an "-r" option to the copy command to do the copy recursively, right ? This could be done if you want to do a backup of your (the users) files. On the other hand, if you want to do a multi-volume backup to several of those disks, you might have to use GNU-tar with the "-M" option and use the right devicename for the EZ-135 disk, which I can't tell without seeing at least part of the boot sequence of your system, sorry. Giving the wrong answer here, would, as said before, destroy any information on the wrong disk ! Regards, Norbert. -- Norbert Bladt Head System Software Development ascom Autelca AG Payphone and Cashless Transaction Systems Worbstrasse 201 CH-3073 Guemligen, Switzerland abladtn@autelca.ascom.ch VOICE: +41 31 999 6552, FAX: +41 31 999 6575 From owner-freebsd-scsi Mon Jun 24 03:56:36 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA04110 for freebsd-scsi-outgoing; Mon, 24 Jun 1996 03:56:36 -0700 (PDT) Received: from deceased.hb.north.de (deceased.hb.north.de [194.94.232.249]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA04105 for ; Mon, 24 Jun 1996 03:56:25 -0700 (PDT) Received: from jelal.hb.north.de by deceased.hb.north.de with uucp (Smail3.1.93) id m0uY9J1-0016IHC; Mon, 24 Jun 96 12:55:43 +0200 (MET DST) Received: by jelal.hb.north.de (SMail-ST 0.95gcc/2.5+) id AA00157; Mon, 24 Jun 1996 12:53:08 +0100 (CET) Received: (from nox@localhost) by saturn.hb.north.de (8.7.5/8.7.3) id DAA26925; Mon, 24 Jun 1996 03:06:31 +0200 (MET DST) Date: Mon, 24 Jun 1996 03:06:31 +0200 (MET DST) From: Juergen Lock Message-Id: <199606240106.DAA26925@saturn.hb.north.de> To: bob@luke.pmr.com Subject: Re: Questions about Archive Python DAT autoloader In-Reply-To: <199606221751.MAA17716@luke.pmr.com> Organization: none Cc: scsi@freebsd.org Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In article <199606221751.MAA17716@luke.pmr.com> you write: >I have an Archive Python 4586 DAT autoloader that I have no >information about and was hoping someone could tell me what the >DIP switches on the back control. Cant help on that one (well who bought Archive again? maybe they have it on a web site...) > Also, how can I get it to change >to a different tape? but if its similar to the HP DAT autoloader then this might get you started: #! /usr/bin/suidperl $ENV{'PATH'} = '/bin:/usr/bin'; $ENV{'SHELL'} = '/bin/sh' if $ENV{'SHELL'} ne ''; $ENV{'IFS'} = '' if $ENV{'IFS'} ne ''; # A gross hack to control a HP 1553A tape changer, it uses a single # SCSI address for both tape io and changer commands (MOVE MEDIUM)... # tape (control device) $tape = "/dev/rst0.ctl"; # scsi command timeout $timeout = "3000"; $load = $ARGV[0]; $loop = 0; $first = 1; if ($load eq "0") { # `reset': unload to first free slot $src = 1; $dest = 2; $loop = 1; } elsif ($load > 0) { # load #slot $src = $load + 1; $dest = 1; exit 2 if ($src > 7); } elsif ($load < 0) { # unload to #slot $src = 1; $dest = -$load + 1; exit 2 if ($dest > 7); } else { print "Usage: hp1553a slot|0\n"; print " 0: reset (catch unit attention, unload to first free slot)\n"; print " slot: load slot\n"; print " -slot: unload to slot\n"; exit 2; } movemedium: while ($loop || $first) { # a5 == `MOVE MEDIUM' $c = "a5 0 0 0 00 $src 00 $dest 0 0 0 0"; uattn: while (42) { $res = 0; $| = 1; do { $pid = open(KID_TO_READ, "-|"); unless (defined $pid) { #warn "cannot fork: $!"; #die "bailing out" if $sleep_count++ > 6; exit 2 if $sleep_count++ > 6; sleep 10; } } until defined $pid; if ($pid) { # parent $| = 1; $res = 0; $s = ''; while () { # debug: #print $_; $s .= $_; if (s/^Sense key is "(.*)"$/$1/) { if (/^Unit attention/) { $res = 2; $first = 0 unless ($loop); } elsif (/^Illegal request/) { $res = 1; $first = 0; } else { $res = 2; $first = 0; } } } if (!close(KID_TO_READ)) { $res = $? >> 8; exit 2 unless (!$res); } } else { # child $| = 1; ($EUID, $EGID) = ($UID, $GID); # suid only open(STDERR, ">&STDOUT"); exec "/sbin/scsi", "-f", $tape, "-s", $timeout, "-c", $c; exit 2; # NOTREACHED } if ($first) { $first = 0; if ($res == 2) { # maybe got a unit attention, retry next uattn; } } last uattn; } if ($res && $loop) { if ($src == 1) { # `reset': unload failed, try next slot if ($dest < 7) { ++$dest; next movemedium; } else { # done all slots $res = 0; } } } $loop = 0; } exit $res; --------cut------ ATB Juergen From owner-freebsd-scsi Mon Jun 24 04:15:02 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA06682 for freebsd-scsi-outgoing; Mon, 24 Jun 1996 04:15:02 -0700 (PDT) Received: from fire.dkrz.de (fire.dkrz.de [136.172.110.250]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA06668 for ; Mon, 24 Jun 1996 04:14:59 -0700 (PDT) Received: from racer.dkrz.de (racer.dkrz.de [136.172.110.55]) by fire.dkrz.de (8.7.5/8.7.3) with ESMTP id NAA13642; Mon, 24 Jun 1996 13:14:15 +0200 (MET DST) Received: (from gwk@localhost) by racer.dkrz.de (8.7.4/8.7.3) id NAA11225; Mon, 24 Jun 1996 13:12:16 +0200 (MET DST) Date: Mon, 24 Jun 1996 13:12:16 +0200 (MET DST) Message-Id: <199606241112.NAA11225@racer.dkrz.de> From: "Georg-W. Koltermann" To: abladtn@autelca.ascom.ch CC: gilles.tschopp@aletsch.esis.vsnet.ch, scsi@FreeBSD.org In-reply-to: <31CE34F6.794BDF32@autelca.ascom.ch> (message from Norbert Bladt on Mon, 24 Jun 1996 08:25:58 +0200) Subject: Re: How to use Syquest EZ-135 as backup drive ? X-Attribution: gwk Reply-to: gwk@cray.com Sender: owner-freebsd-scsi@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >>>>> "Norbert" == Norbert Bladt writes: Norbert> Georg-W. Koltermann wrote: >> >>>>> "Gilles" == Gilles Tschopp >> writes: Gilles> Hello, I'm an beginner of the Unix world. I would like to Gilles> know how to manage backup of my FreeBSD system with the Gilles> TAR command. I have a Syquest EZ-135 plugged on the SCSI Gilles> subsystem. How to do ? Gilles> Gilles> A lot of thanks. Gilles> Gilles> Gilles Tschopp. Gilles> ******************************************* Gilles Gilles> Tschopp, Informaticien de gestion ES Gilles> gilles.tschopp@esis.vsnet.ch http://icare.itech.ch Gilles> http://esis.vsnet.ch http://www.vsnet.ch Gilles> ******************************************* Gilles> Gilles> >> Try cd /someplace Norbert> This is OK. >> tar cvfb /dev/rst0 126 somefiles Norbert> This is a bad idea and a wrong answer, too. I think that Norbert> the EZ-135 is not a tape drive and therefore it is not Norbert> detected as "rst0" ! Instead it will be some sort of Norbert> harddisk. Ouch!! Thank god it's not a scanner. I wouldn't know how to backup to a scanner... I realized when I sent out my first reply that there wasn't much information from Gilles' original question. I only wanted to give him a quick hint without going too much into details--he mentioned being a newbie. I simply picked the most probable case, and hoped he would come back to me if he got 'no such device or address'. If this thing *is* a disk, and Gilles is a newbie, he'll probably have a hard time to get it disklabel(8)'ed and newfs'ed. I think the easiest route for him would then be to a) Unplug any SCSI disks that might be in use, except for the EZ-135. This is for safety, so that any subsequent mistakes will not wipe out system files. b) Start FreeBSD installation, selecting FLOPPY as installation medium (only the boot disk will actually be needed). c) Select the EZ-135 as the target for the install. In the FDISK menu create a FreeBSD slice spanning the whole disk. In the disklabel menu create at least one dummy partition for the root filesystem. That's the minimum to let the install program continue, I believe. d) When the install program continues, it will disklabel the EZ-135. It will continue some more and ask for the root floppy. At this point the installation can be aborted (actually it could even be aborted right after the disklabel step, but let's be sure and wait a little bit). e) Reconnect the devices from a). Boot as usual, watching the SCSI probe messages and take note which "sdX" the EZ-135 is. f) Check the /dev directory for an entry for the "sdX" (substitute actual unit number for X) found during the probe. Both the basic "sdX" and the "sdX{a,b,c...}" partitions should be there. If they aren't, run "MAKDEDEV sdXa" while in the /dev directory. It should now be possible to access the EZ-135. The whole volume will be /dev/sdXc. Any partitions created in c) would be usable also, if one desires to subdivide the unit. The remaining steps depend on the backup tools used: Tar could write directly to the device or any partitions (the "raw" device or partitions /dev/rsdXy would be preferred for tar). In order to use cp(1), one would need to run newfs(8) on the device or partition first, and then mount(8) it. Georg-W. Koltermann, gwk@cray.com From owner-freebsd-scsi Mon Jun 24 05:23:29 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA15363 for freebsd-scsi-outgoing; Mon, 24 Jun 1996 05:23:29 -0700 (PDT) Received: from dns1.vsnet.ch (dns1.vsnet.ch [153.109.10.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id FAA15322 for ; Mon, 24 Jun 1996 05:23:21 -0700 (PDT) Received: from aletsch.esis.vsnet.ch by dns1.vsnet.ch with SMTP (1.38.193.4/16.2) id AA12616; Mon, 24 Jun 1996 14:21:40 +0200 Received: from icare-gilles.itech.ch by aletsch.esis.vsnet.ch (AIX 3.2/UCB 5.64/4.03) id AA13570; Mon, 24 Jun 1996 14:22:46 GMT Date: Mon, 24 Jun 1996 14:22:46 GMT Message-Id: <9606241422.AA13570@aletsch.esis.vsnet.ch> X-Sender: tschopp@aletsch.esis.vsnet.ch X-Mailer: Windows Eudora Light Version 1.5.2 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: gwk@cray.com From: Gilles Tschopp Subject: Re: How to use Syquest EZ-135 as backup drive ? Cc: scsi@FreeBSD.org Sender: owner-freebsd-scsi@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk I resent my message in order that scsi@FreeBSD.org will receive it, which it wasn't the case in my previous message. At 13:12 24/06/96 +0200, you wrote: >If this thing *is* a disk, and Gilles is a newbie, he'll probably have I'm a newbie ONLY on the administration part of UNIX ... Not the basis of UNIX ! ... My biggest problem is the lack of French and English documentation in Switzerland ... I have a book, but the TAR command is explained in two or three sentences... and the MAN page is too obscure for me. I need some pratical examples. And I'm still expecting a book which I ordered for three weeks. >a hard time to get it disklabel(8)'ed and newfs'ed. I think the >easiest route for him would then be to I know about disklabel and newfs ... But it isn't my aim. > > f) Check the /dev directory for an entry for the "sdX" > (substitute actual unit number for X) found during the > probe. Both the basic "sdX" and the "sdX{a,b,c...}" > partitions should be there. If they aren't, run "MAKDEDEV > sdXa" while in the /dev directory. > >It should now be possible to access the EZ-135. The whole volume will >be /dev/sdXc. Any partitions created in c) would be usable also, if >one desires to subdivide the unit. It is already done. I have done enough experimentations through FreeBSD ! :-) I installed FreeBSD since three weeks. The EZ-135 is affected ad "sd1a" device. My goal is to make a comprehensive backup of my FreeBSD system, and the TAR command is too obscure for me, until I'll get the expecting book. But it is better to doing the backup process now ... So I would like to get a good and _safe_ method to backup the whole FreeBSD to my EZ-135. Thank you for your help. Gilles. ******************************************* Gilles Tschopp, Informaticien de gestion ES gilles.tschopp@esis.vsnet.ch http://icare.itech.ch http://esis.vsnet.ch http://www.vsnet.ch ******************************************* From owner-freebsd-scsi Mon Jun 24 09:55:37 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA04873 for freebsd-scsi-outgoing; Mon, 24 Jun 1996 09:55:37 -0700 (PDT) Received: from cedb.dpcsys.com (cedb.DPCSYS.COM [165.90.143.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA04866 for ; Mon, 24 Jun 1996 09:55:34 -0700 (PDT) Received: from cedb (cedb.DPCSYS.COM [165.90.143.3]) by cedb.dpcsys.com (8.6.10/DPC-1.0) with SMTP id JAA05987; Mon, 24 Jun 1996 09:49:29 -0700 Date: Mon, 24 Jun 1996 09:49:29 -0700 (PDT) From: Dan Busarow X-Sender: dan@cedb To: Gilles Tschopp cc: scsi@FreeBSD.org Subject: Re: How to use Syquest EZ-135 as backup drive ? In-Reply-To: <9606241422.AA13570@aletsch.esis.vsnet.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 24 Jun 1996, Gilles Tschopp wrote: > > The EZ-135 is affected ad "sd1a" device. My goal is to make a comprehensive > backup of my FreeBSD system, and the TAR command is too obscure for me, > until I'll get the expecting book. But it is better to doing the backup > process now ... So I would like to get a good and _safe_ method to backup > the whole FreeBSD to my EZ-135. If you have only a root file system mount /dev/sd1a /mnt find / -d -x | cpio -pdmv /mnt umount /mnt The -x option to find prevents it from recursively copying /mnt If you have both root and /usr (or any other filesystems), perform additional find/cpio's on them after cpio'ing root and before umounting /mnt :) find /usr -d -x | cpio -pdmv /mnt/usr Dan -- Dan Busarow 714 443 4172 DPC Systems dan@dpcsys.com Dana Point, California 83 09 EF 59 E0 11 89 B4 8D 09 DB FD E1 DD 0C 82 From owner-freebsd-scsi Mon Jun 24 22:22:35 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA15290 for freebsd-scsi-outgoing; Mon, 24 Jun 1996 22:22:35 -0700 (PDT) Received: from kitten.mcs.com (Kitten.mcs.com [192.160.127.90]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA15285 for ; Mon, 24 Jun 1996 22:22:33 -0700 (PDT) Received: from mailbox.mcs.com (Mailbox.mcs.com [192.160.127.87]) by kitten.mcs.com (8.7.5/8.6.9) with SMTP id AAA08878 for ; Tue, 25 Jun 1996 00:22:32 -0500 (CDT) Received: by mailbox.mcs.com (/\==/\ Smail3.1.28.1 #28.5) id ; Tue, 25 Jun 96 00:22 CDT Received: by mercury.mcs.com (/\==/\ Smail3.1.28.1 #28.5) id ; Tue, 25 Jun 96 00:22 CDT Message-Id: Subject: Patch to cd driver for Nakamichi/NEC changer To: freebsd-scsi@freebsd.org Date: Tue, 25 Jun 1996 00:22:29 -0500 (CDT) From: "Lars Fredriksen" X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, Would someone try out the following patch to the cd driver. I ran into a problem where when I tried to play an audio cd on a Nakamichi/ Nex 2xc drive, it would reset my SCSI bus. Moving the timeout below up seem to have fixed it. I don't know if 20 is way overkill, but it does work. Peter Dufault suggested that there are other places as well where the timeouts are probably to short for certain devices. Lars Index: cd.c =================================================================== RCS file: /home/ncvs/src/sys/scsi/cd.c,v retrieving revision 1.70 diff -c -r1.70 cd.c *** cd.c 1996/06/12 05:10:51 1.70 --- cd.c 1996/06/13 20:15:25 *************** *** 1275,1281 **** 0, 0, CDRETRIES, ! 2000, NULL, 0)); } --- 1275,1281 ---- 0, 0, CDRETRIES, ! 20000, NULL, 0)); } -- ------------------------------------------------------------------- Lars Fredriksen fredriks@mcs.com (home) lars@fredriks.pr.mcs.net (home-home) From owner-freebsd-scsi Tue Jun 25 14:22:16 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA22088 for freebsd-scsi-outgoing; Tue, 25 Jun 1996 14:22:16 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA22042 for ; Tue, 25 Jun 1996 14:22:01 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id XAA27499 for ; Tue, 25 Jun 1996 23:21:55 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id XAA17561 for freebsd-scsi@freebsd.org; Tue, 25 Jun 1996 23:21:55 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id XAA20459; Tue, 25 Jun 1996 23:16:26 +0200 (MET DST) Date: Tue, 25 Jun 1996 23:16:26 +0200 (MET DST) Message-Id: <199606252116.XAA20459@uriah.heep.sax.de> X-Newsreader: knews 0.9.6 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <1228200966@f401.n711.z3.ftn> <4qjiem$4ds@uriah.heep.sax.de> <31CFDD5A.794BDF32@strata.net.au> From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: SCSI bus rescan Newsgroups: comp.unix.bsd.freebsd.misc Cc: freebsd-scsi@freebsd.org Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Trev Roydhouse wrote: > > > > scsi -f /dev/rsd0.ctl -r > > > > > This results in "aha0: DMA beynd end Of ISA" ... ? > > > > You've got more than 16 MB RAM with an AHA154X? You need bounce > > buffers then (options BOUNCE_BUFFERS). > > Yep, 48mb plus an AHA1542b. However, I _already_ have the BOUNCE_BUFFERS > option enabled in the config file. Seems something slipped through where bounce buffers are needed but not used. I'm Cc'ing freebsd-scsi@freebsd.org for this. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-freebsd-scsi Wed Jun 26 14:53:30 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA18164 for freebsd-scsi-outgoing; Wed, 26 Jun 1996 14:53:30 -0700 (PDT) Received: from burdell.cc.gatech.edu (root@burdell.cc.gatech.edu [130.207.3.207]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA18129 for ; Wed, 26 Jun 1996 14:53:25 -0700 (PDT) Received: from oscar.cc.gatech.edu (cau@oscar.cc.gatech.edu [130.207.107.12]) by burdell.cc.gatech.edu (8.7.5/8.6.9) with ESMTP id RAA19010 for ; Wed, 26 Jun 1996 17:53:16 -0400 (EDT) Received: (from cau@localhost) by oscar.cc.gatech.edu (8.7.5/8.6.9) id RAA13593 for freebsd-scsi@freebsd.org; Wed, 26 Jun 1996 17:53:15 -0400 (EDT) From: cau@cc.gatech.edu (Carlos Ugarte) Message-Id: <199606262153.RAA13593@oscar.cc.gatech.edu> Subject: help writing a new SCSI device driver To: freebsd-scsi@freebsd.org Date: Wed, 26 Jun 1996 17:53:15 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi there, A few months back I asked for some help/pointers in writing a device driver for a currently unsupported SCSI host adapter (Future Domain 16xx, using the TMC-18xx chipset). Unfortunately, I haven't been able to start on it until now, and I have a few questions... I've looked through the new (red) daemon book, through the ddwg tutorial at http://www.freebsd.org/tutorials, through some of the existing drivers (seagate.c, aha1542.c, aic6360.c), and through some of the SCSI header files (/sys/scsi/...). From these, I've got a pretty good idea of what some things are (xx_probe(), xx_attach(), the structures) but not others. This is the first time I'm writing anything SCSI; I've also been reading part of the SCSI drafts. Could someone give me a description of the following? I'd like to know what they are supposed to do (description, what to return, whatever). -xx_init() - is this required? I see it in the drivers, but not as one of the elements of the scsi_* structures... -xx_scsi_cmd() -xx_minphys() -xx_adapter_info() -xxintr() -KVTOPHYS, PHYSTOKV -splbio(), splx(), other spl() calls I'm using the Linux driver as well as an older (apparently nonworking) version of a driver for the FD-1670 sent me by Julian Elischer as a base for my work. If anyone has any suggestions, I'd be glad to hear them (drivers/SCSI/etc). Thanks in advance. Carlos -- Carlos A. Ugarte cau@cc.gatech.edu Author of PageMage, a virtual desktop util for OS/2 http://www.cc.gatech.edu/people/home/cau/ If you understand what you're doing, you are not learning anything From owner-freebsd-scsi Thu Jun 27 06:08:33 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA23176 for freebsd-scsi-outgoing; Thu, 27 Jun 1996 06:08:33 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id GAA23169 for ; Thu, 27 Jun 1996 06:08:26 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id XAA11215; Thu, 27 Jun 1996 23:02:36 +1000 Date: Thu, 27 Jun 1996 23:02:36 +1000 From: Bruce Evans Message-Id: <199606271302.XAA11215@godzilla.zeta.org.au> To: cau@cc.gatech.edu, freebsd-scsi@FreeBSD.org Subject: Re: help writing a new SCSI device driver Sender: owner-freebsd-scsi@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >Could someone give me a description of the following? I'd like >to know what they are supposed to do (description, what to return, >whatever). >-xx_init() - is this required? I see it in the drivers, but not > as one of the elements of the scsi_* structures... Internal to drivers. Many of the SCSI drivers have a common ancestry so their function names are often similar. Many (not necessarily SCSI) drivers follow the convention that local functions are named xx_foo and global functions are named xxfoo. >-xx_scsi_cmd() This is the main entry point to the driver. It can be named anything, but there must be a corresponding entry in the scsi adapter struct. >-xx_minphys() This is to stop physio() from requesting a larger block size than the driver can handle (e.g., 256 scattered blocks of 4K when the driver can only handle 16 scattered blocks. physio() actually never asks for more than 64K). >-xx_adapter_info() Another entry in the scsi adapter struct. >-xxintr() Interrupt handler for driver xx. >-KVTOPHYS, PHYSTOKV Kernel Virtual address TO PHYSical address and the reverse. >-splbio(), splx(), other spl() calls See a daemon book. SCSI drivers should need only splbio() and splx() (to protect critical code from being interrupted). Bruce From owner-freebsd-scsi Fri Jun 28 21:08:27 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA02034 for freebsd-scsi-outgoing; Fri, 28 Jun 1996 21:08:27 -0700 (PDT) Received: from burdell.cc.gatech.edu (root@burdell.cc.gatech.edu [130.207.3.207]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id VAA02029 for ; Fri, 28 Jun 1996 21:08:25 -0700 (PDT) Received: from oscar.cc.gatech.edu (cau@oscar.cc.gatech.edu [130.207.107.12]) by burdell.cc.gatech.edu (8.7.5/8.6.9) with ESMTP id AAA14867; Sat, 29 Jun 1996 00:07:45 -0400 (EDT) Received: (from cau@localhost) by oscar.cc.gatech.edu (8.7.5/8.6.9) id AAA11695; Sat, 29 Jun 1996 00:07:35 -0400 (EDT) From: cau@cc.gatech.edu (Carlos Ugarte) Message-Id: <199606290407.AAA11695@oscar.cc.gatech.edu> Subject: Re: help writing a new SCSI device driver To: freebsd-scsi@freebsd.org Date: Sat, 29 Jun 1996 00:07:34 -0400 (EDT) Cc: cau@cc.gatech.edu In-Reply-To: <199606271302.XAA11215@godzilla.zeta.org.au> from "Bruce Evans" at Jun 27, 96 11:02:36 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Thanks for the help. I took a second look at the daemon book, and with the hints here it makes more sense. But I've a few more questions now... I see that KVTOPHYS is done using a function, but PHYSTOKV varies a lot (by driver). Some store the xor of the physical and kernel virtual addresses to convert between one and the other, but I'm not sure if this will work for the entire memory range... I know the SCSI bios is in a certain memory range (say, physical 0xca000); and using the PHYSTOKV macro from wd7000.c, I am actually able to check the BIOS - but I wonder if this will work at all times. This method works by adding KERNBASE to the physical address, or taking the OR of the physical address and 0xf0000000. Both work in my case, but I wonder... Also, I noticed that not all drivers seem to support disconnection/reselection. Is this because it is difficult to implement, or because it provides little improvement? All docs I've seen imply that you gain some, but never quantify how much... Is it worth the trouble, if it can be done? Carlos -- Carlos A. Ugarte cau@cc.gatech.edu Author of PageMage, a virtual desktop util for OS/2 http://www.cc.gatech.edu/people/home/cau/ If you understand what you're doing, you are not learning anything From owner-freebsd-scsi Sat Jun 29 02:58:02 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA21938 for freebsd-scsi-outgoing; Sat, 29 Jun 1996 02:58:02 -0700 (PDT) Received: from hda.com (ip77-max1-fitch.zipnet.net [199.232.245.77]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA21933 for ; Sat, 29 Jun 1996 02:57:59 -0700 (PDT) Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id FAA03755; Sat, 29 Jun 1996 05:54:14 -0400 From: Peter Dufault Message-Id: <199606290954.FAA03755@hda.com> Subject: Re: help writing a new SCSI device driver To: cau@cc.gatech.edu (Carlos Ugarte) Date: Sat, 29 Jun 1996 05:54:13 -0400 (EDT) Cc: freebsd-scsi@FreeBSD.org, cau@cc.gatech.edu In-Reply-To: <199606290407.AAA11695@oscar.cc.gatech.edu> from "Carlos Ugarte" at Jun 29, 96 00:07:34 am Reply-to: hdalog@zipnet.net X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > Also, I noticed that not all drivers seem to support > disconnection/reselection. Is this because it is difficult to > implement, or because it provides little improvement? All docs > I've seen imply that you gain some, but never quantify how > much... Is it worth the trouble, if it can be done? All drivers should support disconnection/reselection to permit adequate bus utilization. The gains are great - you will tie up the bus during disk seeks, etc. if you don't support it. The drivers that don't explicitly support it probably rely on the adapter firmware to do the right thing. The drivers that you see it in are probably the ones we write the firmware for. -- Peter Dufault Real-Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267 From owner-freebsd-scsi Sat Jun 29 03:15:38 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA22490 for freebsd-scsi-outgoing; Sat, 29 Jun 1996 03:15:38 -0700 (PDT) Received: from linux4nn.gn.iaf.nl (root@linux4nn.gn.iaf.nl [193.67.144.34]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA22483 for ; Sat, 29 Jun 1996 03:15:34 -0700 (PDT) Received: from uni4nn.iaf.nl (root@uni4nn.iaf.nl [193.67.144.33]) by linux4nn.gn.iaf.nl (8.6.9/8.6.9) with SMTP id MAA07022; Sat, 29 Jun 1996 12:16:33 +0200 Received: by uni4nn.iaf.nl with UUCP id AA19733 (5.67b/IDA-1.5); Sat, 29 Jun 1996 12:15:39 +0200 Received: by iafnl.es.iaf.nl with UUCP id AA13794 (5.67b/IDA-1.5); Sat, 29 Jun 1996 11:37:10 +0200 Received: (from wilko@localhost) by yedi.iaf.nl (8.6.12/8.6.6) id LAA01149; Sat, 29 Jun 1996 11:34:29 +0200 From: Wilko Bulte Message-Id: <199606290934.LAA01149@yedi.iaf.nl> X-Organisation: Private FreeBSD site - Arnhem - The Netherlands Subject: Re: help writing a new SCSI device driver To: cau@cc.gatech.edu (Carlos Ugarte) Date: Sat, 29 Jun 1996 11:34:29 +0200 (MET DST) Cc: freebsd-scsi@FreeBSD.ORG, cau@cc.gatech.edu In-Reply-To: <199606290407.AAA11695@oscar.cc.gatech.edu> from "Carlos Ugarte" at Jun 29, 96 00:07:34 am X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Carlos Ugarte wrote... > > Also, I noticed that not all drivers seem to support > disconnection/reselection. Is this because it is difficult to > implement, or because it provides little improvement? All docs > I've seen imply that you gain some, but never quantify how > much... Is it worth the trouble, if it can be done? It is definitely a good thing for performance. It allows more concurrency to happen on the SCSI bus . It takes some thought to implement it well, so maybe that's the reason not all drivers have it. Wilko _ ____________________________________________________________________ | / o / / _ Wilko Bulte email: wilko@yedi.iaf.nl |/|/ / / /( (_) Private FreeBSD site - Arnhem - The Netherlands -------------------------------------------------------------------------- From owner-freebsd-scsi Sat Jun 29 05:34:47 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA00394 for freebsd-scsi-outgoing; Sat, 29 Jun 1996 05:34:47 -0700 (PDT) Received: from mailbox.neosoft.com (mailbox.neosoft.com [206.109.1.16]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA00389 for ; Sat, 29 Jun 1996 05:34:45 -0700 (PDT) Received: from bonkers.taronga.com (root@bonkers.neosoft.com [206.109.2.48]) by mailbox.neosoft.com (8.7.5/8.7.3) with SMTP id HAA09251 for ; Sat, 29 Jun 1996 07:34:43 -0500 (CDT) Received: (from peter@localhost) by bonkers.taronga.com (8.6.11/8.6.9) id HAA08596; Sat, 29 Jun 1996 07:32:07 -0500 Date: Sat, 29 Jun 1996 07:32:07 -0500 From: peter@taronga.com (Peter da Silva) Message-Id: <199606291232.HAA08596@bonkers.taronga.com> To: scsi@freebsd.org Subject: Re: help writing a new SCSI device driver In-Reply-To: <199606290954.FAA03755@hda.com> References: <199606290407.AAA11695@oscar.cc.gatech.edu> Organization: none Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >All drivers should support disconnection/reselection to permit >adequate bus utilization. The gains are great - you will tie up >the bus during disk seeks, etc. if you don't support it. The biggest problems would be with tapes, I would imagine, during rewinds and things like that. Some tape operations can take an extraordinarily long time... From owner-freebsd-scsi Sat Jun 29 07:15:18 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA04366 for freebsd-scsi-outgoing; Sat, 29 Jun 1996 07:15:18 -0700 (PDT) Received: from hda.com (ip23-max1-fitch.zipnet.net [199.232.245.23]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id HAA04356 for ; Sat, 29 Jun 1996 07:15:15 -0700 (PDT) Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id KAA04079; Sat, 29 Jun 1996 10:11:30 -0400 From: Peter Dufault Message-Id: <199606291411.KAA04079@hda.com> Subject: Re: help writing a new SCSI device driver To: peter@taronga.com (Peter da Silva) Date: Sat, 29 Jun 1996 10:11:29 -0400 (EDT) Cc: scsi@FreeBSD.ORG In-Reply-To: <199606291232.HAA08596@bonkers.taronga.com> from "Peter da Silva" at Jun 29, 96 07:32:07 am Reply-to: hdalog@zipnet.net X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > >All drivers should support disconnection/reselection to permit > >adequate bus utilization. The gains are great - you will tie up > >the bus during disk seeks, etc. if you don't support it. > > The biggest problems would be with tapes, I would imagine, during > rewinds and things like that. Some tape operations can take an > extraordinarily long time... Most of those have special commands that detach and finish up specifically to support brain dead hardware. That isn't to say we always use those commands, though. -- Peter Dufault Real-Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267