From owner-freebsd-scsi@FreeBSD.ORG Fri Jan 23 00:43:47 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 15CF916A4CE for ; Fri, 23 Jan 2004 00:43:47 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8400743D49 for ; Fri, 23 Jan 2004 00:43:43 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id i0N8hZ7E066527; Fri, 23 Jan 2004 00:43:39 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200401230843.i0N8hZ7E066527@gw.catspoiler.org> Date: Fri, 23 Jan 2004 00:43:35 -0800 (PST) From: Don Lewis To: jesse@wingnet.net In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-scsi@FreeBSD.org Subject: Re: adaptec 2940u/uw dump card state ends 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: Fri, 23 Jan 2004 08:43:47 -0000 On 22 Jan, Jesse Guardiani wrote: > Jesse Guardiani wrote: > >> Howdy list, >> >> I'm having trouble with a Sony AIT TSL-SA300C autochanger >> attached to an adaptec 2940u/uw SCSI card and a Seagate AIT >> tape drive. Hopefully someone can shed some light on my >> problem. >> >> The physical (as in cable) SCSI topology looks like the >> following, with terminated devices marked by a (T): >> >> (T)AIT Autochanger <-> 2940u/uw <-> Seagate AIT Tape(T) >> >> I have termination manually turned off in the 2940u/uw's >> software configuration utility. The Seagate AIT tape drive >> is terminated via jumper (Term PWR is off, and SCSI Term >> is ON, if I remember correctly). The Sony Autochanger is >> terminated using a long yellow external wide SCSI ribbon >> cable. The cable has a little black thing on the end that >> I am ASS-U-MEing is a resistor pack for termination. The >> Autochanger's PDF indicates that it is not capable of >> active termination, which makes sense because it's external >> and you can turn it off. >> >> Admittedly, termination may be the issue. I'm relatively >> new to SCSI, and I may not have gotten it right. In >> particular, I don't have a clue what the TERM PWR jumpers >> do on devices that also include a SCSI TERM jumper... >> >> Here is the problem I'm having: >> >> The first time I issue a `chio move drive 0 slot 0` command, >> I get this: >> >> (ch0:ahc0:0:2:1): SCB 0xe - timed out Just a guess ... maybe the changer mechanism requires a longer time than what the driver thinks. At the top of /usr/src/sys/cam/scsi/scsi_ch.c there is the following: /* * Timeout definitions for various changer related commands. They may * be too short for some devices (especially the timeout for INITIALIZE * ELEMENT STATUS). */ static const u_int32_t CH_TIMEOUT_MODE_SENSE = 6000; static const u_int32_t CH_TIMEOUT_MOVE_MEDIUM = 100000; static const u_int32_t CH_TIMEOUT_EXCHANGE_MEDIUM = 100000; static const u_int32_t CH_TIMEOUT_POSITION_TO_ELEMENT = 100000; static const u_int32_t CH_TIMEOUT_READ_ELEMENT_STATUS = 10000; static const u_int32_t CH_TIMEOUT_SEND_VOLTAG = 10000; static const u_int32_t CH_TIMEOUT_INITIALIZE_ELEMENT_STATUS = 500000; I think these times are milliseconds. The scsi command that you are using may be using one of these timeouts: CH_TIMEOUT_MOVE_MEDIUM, CH_TIMEOUT_EXCHANGE_MEDIUM, or CH_TIMEOUT_POSITION_TO_ELEMENT (I'm not very familiar with changers). These appear to be set to 100 seconds, so if your changer takes longer than this, the driver will time out the command before the changer indicates that it is finished. Try bumping these up and rebuild your kernel. They should probably be tunable ... >> >> >> So far, all further commands have been successfull. >> >> Here's my uname: >> >> # uname -a >> FreeBSD billmax.int.wingnet.net 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Sun >> Jan 18 18:29:28 EST 2004 >> jesse@billmax.int.wingnet.net:/usr/src/sys/compile/BILLMAX i386 >> >> Any suggestions? > > Surely someone on the -SCSI list can at LEAST answer my simple questions > about TERM PWR vs SCSI TERM jumpers on drives.... > > I'd love to know why I'm getting the above timeout too, but if someone > could just verify the difference between TERM PWR and SCSI TERM, and > how they should be used then I can at least get a starting point. One of the wires the SCSI bus (TERMPWR) is used to supply termination power to any passive terminators (or active terminators without their own power source) at the ends of the bus. Usually you will want the host adapter to supply termination power. Peripherals also commonly have jumpers or switches that can be set to cause them to supply power to the TERMPWR line. If the peripheral has a jumper labeled TERM PWR, it is used to supply power to the TERMPWR line on the SCSI bus. As I recall, no more than two devices should power the TERMPWR line, to limit the amount of current that would flow if the TERMPWR line is shorted to ground, so that nothing catches on fire. Many peripherals are also able to terminate the bus so that an external terminator is not needed. This is typically done by setting a jumper or switch, or plugging a resistor pack into a socket on the peripheral. If the peripheral at the end of a bus is used to terminate the bus instead of using an external terminator, the power for the terminator can either be taken from the power supplied to the peripheral, or from the TERM PWR line on the SCSI bus. You would want to do the latter if you want the bus to operate properly even if power to the peripheral is shut off. I typically use Seagate SCSI disks which have two jumper positions to control termination and termination power. I believe there are five different jumper arrangements allowed (at least for single-ended SCSI) for the different termination configurations. When the host adapter is at one end of the bus, I prefer to let it feed TERMPWR along with the peripheral at the other end of the bus (assuming that it is always powered on), so that the power to the terminator at the far end of the bus is as clean as possible.