lkml.org 
[lkml]   [1997]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: PATCH: Scsi tape fix

I've attached the relevant appends culled from the archives. This patch
is on Linux-mama (obselete patches) (www.huwig.de/linux/mama) and was
included in the 2.0.32 kernel. When I last tried without the patch it
failed on both 2.0.x & 2.1.x, now it doesn't fail either kernel. I have
a adaptec 2940 & and an exabyte 8200. I've always been told that Linux is
magical...

-------------------------
Jeff Hittman
jhittman@slip.net
-------------------------
SCSI Tape driver

Richard B. Johnson (root@chaos.analogic.com)
Mon, 15 Sep 1997 10:33:34 -0400 (EDT)

* Messages sorted by: [ date ][ thread ][ subject ][ author ]
* Previous message: Philip Gladstone: "Re: ipv4 bind()ing bug"

----------------------------------------------------------------------------

To the maintainer of the SCSI Tape Driver, greetings!
I have noticed a problem starting with kernels this early Spring. If
there are any SCSI Tape errors, the errors seem to persist until the
machine is rebooted.

For instance:

# cp /dev/zero /dev/st0
cp: /dev/st0: I/O error
cp: /dev/st0: I/O error ! This fails after a few minutes.
# mt status
SCSI 2 tape drive: ! This doesn't show any errors
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x45 (unknown).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
# ! Cleaned drive, inserted brand-new tape.
# cp /dev/zero /dev/st0 ! Instantly fails without even attempting to
cp: /dev/st0: I/O error ! access the physical device.
cp: /dev/st0: I/O error
# cp /dev/zero /dev/st0
cp: /dev/st0: I/O error
cp: /dev/st0: I/O error
# mt retension ! mt commands go to /dev/st3, they work.
# mt retension
# cp /dev/zero /dev/st0 ! /dev/st0 commands instantly error out
cp: /dev/st0: I/O error ! without even trying to access the physical
cp: /dev/st0: I/O error ! device.
# exit

It appears as though the driver "remembers" that there was a previous
command-completion failure and refuses to attempt the command again.
Actually, it's not the driver that remembers, it's the controller. The
driver seems to get sense data before each command rather than after,
and refuses to execute the new command because of bad sense data. This bad
sense data was from a previous command.

Sep 15 10:10:32 chaos kernel: st0: Error with sense data:
Current error st09:00: sns = f0 3
Sep 15 10:10:32 chaos kernel: ASC=31 ASCQ= 0
Sep 15 10:10:32 chaos kernel: Raw sense data:
0xf0 0x00 0x03 0x00 0x00 0x02 0xec 0x0a 0x00 0x00
0x00 0x00 0x31 0x00 0x00 0x00
Sep 15 10:10:32 chaos kernel: st0: Error with sense data:
Current error st09:00: sns = f0 3
Sep 15 10:10:32 chaos kernel: ASC=31 ASCQ= 0
Sep 15 10:10:32 chaos kernel: Raw sense data:
0xf0 0x00 0x03 0x00 0x00 0x00 0x01 0x0a 0x00 0x00
0x00 0x00 0x31 0x00 0x00 0x00
Sep 15 10:10:32 chaos kernel: st0: Error on write filemark.

CONFIG_MODULES=y
CONFIG_NET=y
CONFIG_PCI=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_M586=y
CONFIG_VIDEO_SELECT=y
CONFIG_PNP=y
CONFIG_BLK_DEV_FD=y
CONFIG_NET_ALIAS=y
CONFIG_INET=y
CONFIG_PATH_MTU_DISCOVERY=y
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_SCSI_BUSLOGIC=y
CONFIG_SCSI_OMIT_FLASHPOINT=y
CONFIG_NETDEVICES=y
CONFIG_DUMMY=y
CONFIG_NET_ETHERNET=y
CONFIG_NET_ISA=y
CONFIG_NE2000=y
CONFIG_PPP=y
CONFIG_EXT2_FS=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_NFSD=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_ISO9660_FS=y
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y

Cheers,
DJ
Richard B. Johnson
Analogic Corporation
Penguin : Linux version 2.1.54 on an i586 machine (66.15 BogoMips).
Warning : It's hard to stay on the trailing edge of technology.
Linux : Engineering tool
Windows : Child's computer interface written in BASIC.
Win-NT : Child's computer interface rewritten in C.


----------------------------------------------------------------------------

* Previous message: Philip Gladstone: "Re: ipv4 bind()ing bug"
Possible problem with SCSI Tape driver

Richard B. Johnson (root@chaos.analogic.com)
Mon, 15 Sep 1997 13:02:09 -0400 (EDT)

* Messages sorted by: [ date ][ thread ][ subject ][ author ]
* Next message: John Kennedy: "Re: Never ending kernel"
* Previous message: Sander van Malssen: "Re: [2.1.54+] SoundBlaster 2.0
breaks"

----------------------------------------------------------------------------

Hello,
I noticed that the SCSI tape driver seems to "remember" errors from
previous use so that once a fatal tape-drive error occurs, the machine
must be rebooted in order to use the drive again.

The following simple patch seems to fix the problem. However, this
is not deemed to definitive in any manner, this might just be covering
up some other problem somewhere else. I clear previous fatal errors in
the open routine.

--- st.c.orig Mon Sep 15 12:47:10 1997
+++ st.c Mon Sep 15 12:47:21 1997
@@ -589,7 +589,7 @@
STp->buffer = st_buffers[i];
(STp->buffer)->in_use = 1;
(STp->buffer)->writing = 0;
-
+ (STp->buffer)->last_result_fatal = 0;
flags = filp->f_flags;
STp->write_prot = ((flags & O_ACCMODE) == O_RDONLY);


Cheers,
DJ
Richard B. Johnson
Analogic Corporation
Penguin : Linux version 2.1.54 on an i586 machine (66.15 BogoMips).
Warning : It's hard to stay on the trailing edge of technology.
Linux : Engineering tool
Windows : Child's computer interface written in BASIC.
Win-NT : Child's computer interface rewritten in C.

----------------------------------------------------------------------------
* Next message: John Kennedy: "Re: Never ending kernel"
* Previous message: Sander van Malssen: "Re: [2.1.54+] SoundBlaster 2.0
breaks"Another patch to get included into 2.0.32

Lorenzo M. Catucci (lorenzo@argon.roma2.infn.it)
Mon, 17 Nov 1997 14:50:35 +0100 (CET)

* Messages sorted by: [ date ][ thread ][ subject ][ author ]
* Next message: Mike Jagdis: "Re: Zombie request-route with 2.0.31`"
* Previous message: Martin Maciaszek: "Fuzzy textmode"

----------------------------------------------------------------------------

Please, don't forget the small scsi tape patch, which is floating around,
but didn't get into pre5 (didn't see any mention about it, therefore I
think it's still out of 2.0.32).

I think that the second diff should be cut off, if the patch is accepted,
still, I put it in now...

diff -ruN linux-2.0.31/drivers/scsi/st.c linux/drivers/scsi/st.c
--- linux-2.0.31/drivers/scsi/st.c Wed Sep 10 17:50:29 1997
+++ linux/drivers/scsi/st.c Mon Oct 20 13:31:37 1997
@@ -556,7 +556,7 @@
STp->buffer = st_buffers[i];
(STp->buffer)->in_use = 1;
(STp->buffer)->writing = 0;
-
+ (STp->buffer)->last_result_fatal = 0;
flags = filp->f_flags;
STp->write_prot = ((flags & O_ACCMODE) == O_RDONLY);

diff -ruN linux-2.0.31/init/patches/st-error-fix.pinfo linux/init/patches/st-error-fix.pinfo
--- linux-2.0.31/init/patches/st-error-fix.pinfo Thu Jan 1 01:00:00 1970
+++ linux/init/patches/st-error-fix.pinfo Mon Oct 20 13:31:37 1997
@@ -0,0 +1 @@
+Fix for SCSI tape 'remembering' errors from previous use (Richard B. Johnson <root@chaos.analogic.com>)
----------------------------------------------------------------------------
* Next message: Mike Jagdis: "Re: Zombie request-route with 2.0.31`"
* Previous message: Martin Maciaszek: "Fuzzy textmode"
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.061 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site