Hello,
I have expierenced a problem with the aic7xxx driver or the scsi tape
support in the linux kernel.
[Problem Description]
Under linux kernels since 2.6.15 every "action" I issue to the tape
drive (I mainly do this via <mt> from the cpio package) is done but
additionaly to every mt call a tape rewind is done too. So for example
positioning the tape at some particular position is impossible because
after the positioning itself it is rewinded automagically.
Under kernels before and including 2.6.14.7 this problem did not occur.
[My Hardware Setup]
*i686 pc style hardware
*Adaptec 2940 Ultra SCSI adapter (aic7880)
*attached tape drive: HP SureStore DAT40 (C5683A)
[Kernel Config]
see attachments for relevant switches
[What I Have Done Until Now]
*I testet kernel 2.6.22.1 to verify the problem still exists in latest
kernel
*I compiled and used mt from latest unpatched cpio-2.9 (to make sure it
is not related to the heavily patched debian version)
*I compiled debug code for aic7xxx in the kernels (unfortunatly the
debug output don't show any inregularities (see attachments))
*I verified that mt is not just telling me wrong file numbers or block
positions: with reading a file from tape with dd it turns out that the
tape position must have been the tape start (using kernel 2.6.15+)
*I reverted the two patches I found stated in changelog of 2.6.15
relating the aic7xxx module. This is "aci7xxx: reset handler selects a
wrong command" and "aic7xxx: remove scsi_assign_lock usage". It did not
solve the problem, even taking the complete aic7xxx_osm.c from 2.6.14.7
to the 2.6.15 source tree did not change the situation. So the problem
may be somewhere else in the aic7xxx-module.
[Attachments]
kernel-config ... the relevant scsi-switches for all the
kernels I used
14.7.dmesg ... the (hopefully) relevant dmesg output
from 2.6.14.7 kernel
14.7.mt-status-after-boot ... the output of "mt status" after boot
(tape was at block 0)
14.7.mt-fsf-2.kern.log ... the kernel output during "mt fsf 2"
14.7.mt-status-after-mt-fsf-2 ... the output of "mt status" after "mt
fsf 2" (file number is now *2*)
15.dmesg ... the (hopefully) relevant dmesg output
from 2.15 kernel
15.mt-status-after-boot ... the output of "mt -f /dev/st0 status"
after boot (tape was at block 0)
15.mt-fsf-2.kern.log ... the kernel output during "mt -f
/dev/st0 fsf 2"
15.mt-status-after-mt-fsf-2 ... the output of "mt status" after "mt -f
/dev/st0 fsf 2" (file number is now *0*)
If this might really be a problem in the aic7xxx module I hope I could
and can help pointing it out. So if I should do something else to give
you more or more precise information please let me know...
Thank you very much...
Frank
#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#
# CONFIG_BLK_DEV_SD is not set
CONFIG_CHR_DEV_ST=y
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
#
# SCSI Transport Attributes
#
CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
CONFIG_SCSI_AIC7XXX=y
CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
CONFIG_AIC7XXX_RESET_DELAY_MS=15000
CONFIG_AIC7XXX_DEBUG_ENABLE=y
CONFIG_AIC7XXX_DEBUG_MASK=2047
CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA24XX is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
Linux version 2.6.14.7-vanilla (root@struppi) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Tue Jul 17 03:22:38 CEST 2007
[...]
SCSI subsystem initialized
[...]
ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 17
ahc_pci:0:10:0: hardware scb 64 bytes; kernel scb 52 bytes; ahc_dma 8 bytes
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
<Adaptec 2940 Ultra SCSI adapter>
aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs
Vendor: HP Model: C5683A Rev: C908
Type: Sequential-Access ANSI SCSI revision: 02
target0:0:0: Beginning Domain Validation
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0xc0
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x2
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x2
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: Asserting ATN for response
scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Message-out phase
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x45
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x0
scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x45
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x0
target0:0:0: wide asynchronous.
scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Command phase
target0:0:0: Domain Validation skipping write tests
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0xc0
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x19
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x8
scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x19
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x8
target0:0:0: FAST-10 WIDE SCSI 20.0 MB/s ST (100 ns, offset 8)
scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Command phase
target0:0:0: Ending Domain Validation
(scsi0:A:1:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:2:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:3:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:4:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:5:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:6:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:8:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:9:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:10:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:11:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:12:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:13:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:14:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:15:0): Saw Selection Timeout for SCB 0x3
st: Version 20050830, fixed bufsize 32768, s/g segs 256
Attached scsi tape st0 at scsi0, channel 0, id 0, lun 0
st0: try direct i/o: yes (alignment 512 B), max page reachable by HBA 1048575
[...]
drive type = 114
drive status = 637534208
sense key error = 0
residue count = 0
file number = 0
block number = 0
Jul 17 17:10:07 struppi kernel: (scsi0:A:0:0): SCB 2: requests Check Status
Jul 17 17:10:07 struppi kernel: (scsi0:A:0:0): Sending Sense
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x80
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x2
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x2
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: Asserting ATN for response
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Message-out phase
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x19
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x8
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x19
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x8
Jul 17 17:10:07 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Command phase
Jul 17 17:10:07 struppi kernel: (scsi0:A:0:0): Handled Sense Residual of 10 bytes
Jul 17 17:10:07 struppi kernel: Copied 22 bytes of sense data:
Jul 17 17:10:07 struppi kernel: 0x70 0x0 0x6 0x0 0x0 0x0 0x0 0xe 0x0 0x0 0x0 0x0 0x29 0x0 0x0 0x0
Jul 17 17:10:07 struppi kernel: 0x0 0x0 0x0 0x0 0x0 0x0
Jul 17 17:10:07 struppi kernel: st0: Block limits 1 - 16777215 bytes.
drive type = 114
drive status = 637534208
sense key error = 0
residue count = 0
file number = 2
block number = 0
Linux version 2.6.15-vanilla (root@struppi) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #5 Tue Jul 17 14:57:14 CEST 2007
[...]
SCSI subsystem initialized
[...]
ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 17
ahc_pci:0:10:0: hardware scb 64 bytes; kernel scb 52 bytes; ahc_dma 8 bytes
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
<Adaptec 2940 Ultra SCSI adapter>
aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs
Vendor: HP Model: C5683A Rev: C908
Type: Sequential-Access ANSI SCSI revision: 02
target0:0:0: Beginning Domain Validation
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0xc0
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x2
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x2
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: Asserting ATN for response
scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Message-out phase
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x45
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x0
scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x45
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x0
target0:0:0: wide asynchronous.
scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Command phase
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0xc0
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x19
scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x8
scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x19
scsi0:A:0:0: INITIATOR_MSG_IN byte 0x8
target0:0:0: FAST-10 WIDE SCSI 20.0 MB/s ST (100 ns, offset 8)
scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Command phase
target0:0:0: Domain Validation skipping write tests
target0:0:0: Ending Domain Validation
(scsi0:A:1:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:2:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:3:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:4:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:5:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:6:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:8:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:9:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:10:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:11:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:12:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:13:0): Saw Selection Timeout for SCB 0x2
(scsi0:A:14:0): Saw Selection Timeout for SCB 0x3
(scsi0:A:15:0): Saw Selection Timeout for SCB 0x2
st: Version 20050830, fixed bufsize 32768, s/g segs 256
st 0:0:0:0: Attached scsi tape st0<4>st0: try direct i/o: yes (alignment 512 B), max page reachable by HBA 1048575
[...]
drive type = 114
drive status = 637534208
sense key error = 0
residue count = 0
file number = 0
block number = 0
Jul 17 17:31:58 struppi kernel: (scsi0:A:0:0): SCB 3: requests Check Status
Jul 17 17:31:58 struppi kernel: (scsi0:A:0:0): Sending Sense
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x80
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x2
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x2
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: Asserting ATN for response
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Message-out phase
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x3
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x19
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT byte 0x8
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_OUT PHASEMIS in Message-in phase
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x3
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x1
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x19
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN byte 0x8
Jul 17 17:31:58 struppi kernel: scsi0:A:0:0: INITIATOR_MSG_IN PHASEMIS in Command phase
Jul 17 17:31:58 struppi kernel: (scsi0:A:0:0): Handled Sense Residual of 10 bytes
Jul 17 17:31:58 struppi kernel: Copied 22 bytes of sense data:
Jul 17 17:31:58 struppi kernel: 0x70 0x0 0x6 0x0 0x0 0x0 0x0 0xe 0x0 0x0 0x0 0x0 0x29 0x0 0x0 0x0
Jul 17 17:31:58 struppi kernel: 0x0 0x0 0x0 0x0 0x0 0x0
Jul 17 17:31:58 struppi kernel: st0: Block limits 1 - 16777215 bytes.
drive type = 114
drive status = 637534208
sense key error = 0
residue count = 0
file number = 0
block number = 0