From owner-freebsd-hackers Thu Apr 4 00:11:02 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA07551 for hackers-outgoing; Thu, 4 Apr 1996 00:11:02 -0800 (PST) Received: from ns.pa-consulting.com (ns.pa-consulting.com [193.118.224.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA07535 for ; Thu, 4 Apr 1996 00:10:34 -0800 (PST) Received: from SMTPGATE.PA-CONSULTING.COM by ns.pa-consulting.com (8.6.4) id JAA20124; Thu, 4 Apr 1996 09:18:20 +0100 Received: by SMTPGATE.PA-CONSULTING.COM with Microsoft Mail id <316402E0@SMTPGATE.PA-CONSULTING.COM>; Thu, 04 Apr 96 09:12:00 PST From: Duncan Barclay To: freebsd-hackers Subject: ft Driver Problems Date: Thu, 04 Apr 96 08:55:00 PST Message-ID: <316402E0@SMTPGATE.PA-CONSULTING.COM> Encoding: 72 TEXT X-Mailer: Microsoft Mail V3.0 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I have discovered some problems in the ft (floppy tape) driver code when using my Connor Tapestore800 drive. I am running 2.0.5-R (but am backing up prior ti installing 2.1-R) 1) The list of recognised tape formats is limited. ft doesnt like Travan cartridges. I have added the right numbers to the table but am not posting them as they changed when I reformatted my cart using Connor's DOS software. I dont want to start confusing people! Someone who has the right specs should update the entries. 2) One I fixed the above, all things were going okay using the travan cart and cpio. After a while the machine appeared to hang (I was in single user mode at the time, however later tests shows the process to be waiting on bdone). As I had hacked /sbin/ft to print the segment number I continued to play a little seeking the tape to that segment and kept getting the hangs. Eventually I discovered that the drive took a little longer than the code waits for to respond when it moves the head a few tracks. Specifics: ACMD_BLOCKIO (or similar) calls ACMD_READID to find out where the head is. ACMD_READID issues read id commands to the drive. If the first read id command returns garbage then ACMD_READID then calls ACMD_SEEKSTS to stop the tape moving. ACMD_SEEKSTS waits for the tape to stop and to become ready, timing out after 10seconds. If this timeout occurs then control goes back to ACMD_READID and ACMD_READID should do a further 4 retries. It doesnot. It hangs. My fix for _my_ tape drive is to up the timeout specified by ACMD_READID in the call to ACMD_SEEKSTS to 90seconds. In fact by drive takes about 12seconds to become ready. THIS IS NOT A REAL FIX. I think that the retry stuff in ACMD_READID is broken (a comment in the header of ft.c seems to indicate that hangs did occur and may have been fixed). I am willing to have ago at fixing this, but: I have never written a device driver. I have no time for 6months. I have no idea how QIC tapes work at the s/w level. The state machine in ft.c is big and it would take a long time to trace out what I need to know. I seem to remember someone saying they were going to maintain this code a while back. Anyway, it seems to work and my backup is done. So tonight 2.1-R from my new CDROM (ATAPI Im afraid...:-)) Thanks Raggy PS., Non of the above is anything to do with whom I work for.