Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 2000 16:04:52 -0500 (EST)
From:      Bill Chiarchiaro <wjc@cleartech.com>
To:        freebsd-questions@FreeBSD.ORG
Cc:        wjc@cleartech.com
Subject:   AdvanSys (adw) SCSI Driver and Disconnect / Reconnect Problem
Message-ID:  <200003122104.QAA46149@riesling.cleartech.com>

next in thread | raw e-mail | index | archive | help

  I'm stumped by a problem with an AdvanSys ASB3940UW SCSI host
adapter.  In brief, the adw driver fails to properly probe my HP
C1533A tape drive if the AdvanSys card is set to allow disconnect /
operation for the tape drive.

  Here's the detailed background:

  I'm running FreeBSD 3.4-RELEASE on an Asus P2B with a Celeron 366.
My kernel conf file is included below.  My SCSI devices are:

	an IBM DCAS-34330 disk drive,
	a Seagate ST32151N disk drive,
	a Plextor PX-32TX CD-ROM drive,
	and the HP C1533A tape drive.

  Prior to purchasing the ASB3940UW, I was using an Adaptec AHA-1542C
with all the same drives.  Also, the SCSI cable has remained the same,
an Adaptec ACK-F2F-5IT with an active terminator.  When the AHA-1542C
was in use, all the drives exhibited proper behavior, including
demonstrated disconnect / reconnect operation.

  Booting the system with the AdvanSys instead of the Adaptec, dmesg
showed that the disk and CD-ROM drives had been configured, but there
was no mention of the tape drive.

  I then experimented with the AdvanSys's boot-time utility.  The SCSI
Configuration parameters for each drive are:

	Start Unit Command
	SCSI Disconnection
	Command Queueing
	Synchronous Transfer
	ULTRA SCSI Feature
	BIOS Target Control
	Wide Data Transfer

Each take a value of YES or NO.  I haven't tried all 128 combinations
for the tape drive, but I'm convinced that the only one which makes a
differnce is SCSI Disconnection.  If it is set to YES, with all the
other parameters set to YES or all set to NO, then the kernel fails to
correctly probe.  Conversely, if it is set to NO, with all the other
parameters set to YES or all set to NO, then the kernel finds the tape
drive.

  However, with SCSI Disconnection set to NO, then the tape drive does
not do disconnect / reconnect, and activity of the other drives is
interrupted during lengthy tape operations.

  Booting with the -v kernel option reveals the following messages
(the tape drive is target 4 on the SCSI bus) when SCSI Disconnection
is set to YES:

	(probe4:adw0:0:4:0): INQUIRY. CDB: 12 0 0 0 24 0 
	(probe4:adw0:0:4:0): ABORTED COMMAND asc:49,0
	(probe4:adw0:0:4:0): Invalid message error

  I've also included below the dmesg outputs for booting with SCSI
Disconnection set to YES and to NO.

  A search of the FreeBSD email archives and the adw code in the CVS
repository has turned up no clues.  Suggestions, anyone?


Thanks,

Bill Chiarchiaro
wjc@cleartech.com



/usr/src/sys/i386/conf/RIESLING
**********************************************************************
#
# RIESLING -- Customized for riesling.cleartech.com
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
#    http://www.freebsd.org/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.ORG/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.143.2.24 1999/12/05 01:56:42 luoqi Exp $

machine		"i386"
cpu		"I686_CPU"
ident		RIESLING
maxusers	32

options 	INET			#InterNETworking
options 	FFS			#Berkeley Fast Filesystem
options 	FFS_ROOT		#FFS usable as root device [keep this!]
options 	MFS			#Memory Filesystem
options 	MFS_ROOT		#MFS usable as root device, "MFS" req'ed
options 	NFS			#Network Filesystem
options 	NFS_ROOT		#NFS usable as root device, "NFS" req'ed
options 	MSDOSFS			#MSDOS Filesystem
options 	"CD9660"		#ISO 9660 Filesystem
options 	"CD9660_ROOT"		#CD-ROM usable as root. "CD9660" req'ed
options		SOFTUPDATES
# Coda stuff:
options		CODA			#CODA filesystem.
pseudo-device	vcoda	4		#coda minicache <-> venus comm.
options 	PROCFS			#Process filesystem
options 	"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
options 	UCONSOLE		#Allow users to grab the console
options 	FAILSAFE		#Be conservative
options 	USERCONFIG		#boot -c editor
options 	VISUAL_USERCONFIG	#visual boot -c editor
options 	KTRACE			#ktrace(1) syscall trace support
options 	SYSVSHM			#SYSV-style shared memory
options 	SYSVMSG			#SYSV-style message queues
options 	SYSVSEM			#SYSV-style semaphores

config		kernel	root on da0

controller	isa0
controller	pnp0			# PnP support for ISA
controller	pci0

# Floppy drives
controller	fdc0	at isa? port "IO_FD1" bio irq 6 drq 2
disk		fd0	at fdc0 drive 0

# IDE controller and disks
controller	wdc0	at isa? port "IO_WD1" bio irq 14
disk		wd0	at wdc0 drive 0 flags 0xa0ff

# SCSI Controllers
# A single entry for any of these controllers (ncr, ahb, ahc) is
# sufficient for any number of installed devices.
controller	adw0

# SCSI peripherals
# Only one of each of these is needed, they are dynamically allocated.
controller	scbus0		# SCSI bus (required)
device		da0		# Direct Access (disks)
device		sa0		# Sequential Access (tape etc)
device		cd0		# CD
device		pass0		# Passthrough device (direct SCSI)

# atkbdc0 controls both the keyboard and the PS/2 mouse
controller	atkbdc0	at isa? port IO_KBD tty
device		atkbd0	at isa? tty irq 1
device		psm0	at isa? tty irq 12

device		vga0	at isa? port ? conflicts

# splash screen/screen saver
pseudo-device	splash

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? tty

# Floating point support - do not disable.
device		npx0	at isa? port IO_NPX irq 13

# Serial (COM) ports
device		sio0	at isa? port "IO_COM1" flags 0x10 tty irq 4
device		sio1	at isa? port "IO_COM2" tty irq 3
device		sio2	at isa? port "IO_COM3" tty irq 9

# Parallel port
device		ppc0	at isa? port? flags 0x40 net irq 7
controller	ppbus0			# Parallel port bus (required)
device		lpt0	at ppbus?	# Printer
device		plip0	at ppbus?	# TCP/IP over parallel

# PCI Ethernet NICs.
device		pn0		# Lite-On 82c168/82c169 (``PNIC'')

device		pcm0

#USB
controller	uhci0
controller	ohci0
controller	usb0
device		ugen0		# Generic USB device driver
device		uhid0
device		ukbd0
device		ulpt0
device		ums0

# Pseudo devices - the number indicates how many units to allocated.
pseudo-device	loop		# Network loopback
pseudo-device	ether		# Ethernet support
pseudo-device	sl	1	# Kernel SLIP
pseudo-device	ppp	1	# Kernel PPP
pseudo-device	tun	1	# Packet tunnel
pseudo-device	pty	16	# Pseudo-ttys (telnet etc)
pseudo-device	gzip		# Exec gzipped a.out's

# The `bpfilter' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# The number of devices determines the maximum number of
# simultaneous BPF clients programs runnable.
pseudo-device	bpfilter 4	#Berkeley packet filter
options PPP_FILTER			#enable bpf filtering (needs bpfilter)

pseudo-device	snp	3	#Snoop device - to look at pty/vty/etc..

#
# Internet family options:
#
# TCP_COMPAT_42 causes the TCP code to emulate certain bugs present in
# 4.2BSD.  This option should not be used unless you have a 4.2BSD
# machine and TCP connections fail.
#
# MROUTING enables the kernel multicast packet forwarder, which works
# with mrouted(8).
#
# IPFIREWALL enables support for IP firewall construction, in
# conjunction with the `ipfw' program.  IPFIREWALL_VERBOSE sends
# logged packets to the system logger.  IPFIREWALL_VERBOSE_LIMIT
# limits the number of times a matching entry can be logged.
#
# WARNING:  IPFIREWALL defaults to a policy of "deny ip from any to any"
# and if you do not add other rules during startup to allow access,
# YOU WILL LOCK YOURSELF OUT.  It is suggested that you set firewall_type=open
# in /etc/rc.conf when first enabling this feature, then refining the
# firewall rules in /etc/rc.firewall after you've tested that the new kernel
# feature works properly.
#
# IPFIREWALL_DEFAULT_TO_ACCEPT causes the default rule (at boot) to
# allow everything.  Use with care, if a cracker can crash your
# firewall machine, they can get to your protected machines.  However,
# if you are using it as an as-needed filter for specific problems as
# they arise, then this may be for you.  Changing the default to 'allow'
# means that you won't get stuck if the kernel and /sbin/ipfw binary get
# out of sync.
#
# IPDIVERT enables the divert IP sockets, used by ``ipfw divert''
#
# IPFILTER enables Darren Reed's ipfilter package.
# IPFILTER_LOG enables ipfilter's logging.
# IPFILTER_LKM enables LKM support for an ipfilter module (untested).
#
# IPSTEALTH enables code to support stealth forwarding (i.e., forwarding
# packets without touching the ttl).  This can be useful to hide firewalls
# from traceroute and similar tools.
#
# TCPDEBUG is undocumented.
#
options         IPFIREWALL              #firewall
options         IPFIREWALL_VERBOSE      #print information about
					# dropped packets
options         IPFIREWALL_FORWARD      #enable transparent proxy support
options		"IPFIREWALL_VERBOSE_LIMIT=100" #limit verbosity
options		IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
options		IPDIVERT		#divert sockets
options		IPFILTER		#kernel ipfilter support
options		IPFILTER_LOG		#ipfilter logging

# The following options add sysctl variables for controlling how certain
# TCP packets are handled.
# 
# TCP_DROP_SYNFIN adds support for ignoring TCP packets with SYN+FIN. This
# prevents nmap et al. from identifying the TCP/IP stack, but breaks support
# for RFC1644 extensions and is not recommended for web servers.
# 
# TCP_RESTRICT_RST adds support for blocking the emission of TCP RST packets.
# This is useful on systems which are exposed to SYN floods (e.g. IRC servers)
# or any system which one does not want to be easily portscannable.
# 
options 	TCP_DROP_SYNFIN		#drop TCP packets with SYN+FIN
options 	TCP_RESTRICT_RST	#restrict emission of TCP RST

#
# Allow user-mode programs to manipulate their local descriptor tables.
# This option is required for the WINE Windows(tm) emulator, and is
# not used by anything else (that we know of).
#
options		USER_LDT		#allow user-level control of i386 ldt

#
# Allow processes to switch to vm86 mode, as well as enabling direct
# user-mode access to the I/O port space.  This option is necessary for 
# the doscmd emulator to run and the VESA modes in syscons to be available.
#
options		"VM86"

#
# This option includes a MD5 routine in the kernel, this is used for
# various authentication and privacy uses.
#
options		"MD5"

#
# PERFMON causes the driver for Pentium/Pentium Pro performance counters
# to be compiled.  See perfmon(4) for more information.
#
options		PERFMON
************************************************************************



dmesg with SCSI Disconnection set to YES
************************************************************************
Copyright (c) 1992-1999 FreeBSD Inc.
Copyright (c) 1982, 1986, 1989, 1991, 1993
	The Regents of the University of California. All rights reserved.
FreeBSD 3.4-RELEASE #0: Sun Jan 30 14:06:02 EST 2000
    root@riesling.cleartech.com:/usr/src/sys/compile/RIESLING
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 367501911 Hz
CPU: Celeron (367.50-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x660  Stepping = 0
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
real memory  = 67096576 (65524K bytes)
avail memory = 62500864 (61036K bytes)
Pentium Pro MTRR support enabled
Probing for devices on PCI bus 0:
chip0: <Intel 82443BX host to PCI bridge> rev 0x03 on pci0.0.0
chip1: <Intel 82443BX host to AGP bridge> rev 0x03 on pci0.1.0
chip2: <Intel 82371AB PCI to ISA bridge> rev 0x02 on pci0.4.0
ide_pci0: <Intel PIIX4 Bus-master IDE controller> rev 0x01 on pci0.4.1
chip3: <Intel 82371AB Power management controller> rev 0x02 on pci0.4.3
adw0: <AdvanSys ASC3550 SCSI controller> rev 0x00 int a irq 10 on pci0.10.0
adw0: SCSI ID 7, High & Low Termination Enabled, Queue Depth 253
pn0: <82c169 PNIC 10/100BaseTX> rev 0x20 int a irq 10 on pci0.11.0
pn0: Ethernet address: 00:a0:cc:28:a7:f1
pn0: autoneg complete, link status good (half-duplex, 10Mbps)
es1: <AudioPCI ES1371> rev 0x08 int a irq 11 on pci0.12.0
pcm1: using I/O space register mapping at 0xa400
es1371: codec vendor TRA revision 35
es1371: codec features Bass & Treble
es1371: stereo enhancement: no 3D stereo enhancement
Probing for devices on PCI bus 1:
vga0: <ATI model 4742 graphics accelerator> rev 0x5c int a irq 11 on pci1.0.0
Probing for PnP devices:
Probing for devices on the ISA bus:
sc0 on isa
sc0: VGA color <16 virtual consoles, flags=0x0>
atkbdc0 at 0x60-0x6f on motherboard
atkbd0 irq 1 on isa
psm0 irq 12 on isa
psm0: model Generic PS/2 mouse, device ID 0
sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
sio2 at 0x3e8-0x3ef irq 9 on isa
sio2: type 16550A
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1.44MB 3.5in
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc0: unit 0 (wd0): <IBM-DPTA-372050>, DMA, 32-bit, multi-block-16
wd0: 19574MB (40088160 sectors), 39770 cyls, 16 heads, 63 S/T, 512 B/S
ppc0 at 0x378 irq 7 flags 0x40 on isa
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/9 bytes threshold
ppb0: IEEE1284 device found /NIBBLE
Probing for PnP devices on ppbus0:
lpt0: <generic printer> on ppbus 0
lpt0: Interrupt-driven port
plip0: <PLIP network interface> on ppbus 0
vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa
npx0 on motherboard
npx0: INT 16 interface
IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
IP Filter: initialized.  Default = pass all, Logging = enabled
Waiting 2 seconds for SCSI devices to settle
(probe4:adw0:0:4:0): INQUIRY. CDB: 12 0 0 0 24 0 
(probe4:adw0:0:4:0): ABORTED COMMAND asc:49,0
(probe4:adw0:0:4:0): Invalid message error
changing root device to da0s1a
da1 at adw0 bus 0 target 1 lun 0
da1: <SEAGATE ST32151N HP02> Fixed Direct Access SCSI-2 device 
da1: 10.000MB/s transfers (10.000MHz, offset 15), Tagged Queueing Enabled
da1: 2048MB (4194685 512 byte sectors: 255H 63S/T 261C)
da0 at adw0 bus 0 target 0 lun 0
da0: <IBM DCAS-34330 S65A> Fixed Direct Access SCSI-2 device 
da0: 20.000MB/s transfers (20.000MHz, offset 15)
da0: 4134MB (8467200 512 byte sectors: 255H 63S/T 527C)
cd0 at adw0 bus 0 target 5 lun 0
cd0: <PLEXTOR CD-ROM PX-32TS 1.02> Removable CD-ROM SCSI-2 device 
cd0: 20.000MB/s transfers (20.000MHz, offset 15)
cd0: cd present [1265076 x 512 byte records]
lpt0: switched to polled standard mode
************************************************************************



dmesg with SCSI Disconnection set to NO
************************************************************************
Copyright (c) 1992-1999 FreeBSD Inc.
Copyright (c) 1982, 1986, 1989, 1991, 1993
	The Regents of the University of California. All rights reserved.
FreeBSD 3.4-RELEASE #0: Sun Jan 30 14:06:02 EST 2000
    root@riesling.cleartech.com:/usr/src/sys/compile/RIESLING
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 367501414 Hz
CPU: Celeron (367.50-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x660  Stepping = 0
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
real memory  = 67096576 (65524K bytes)
avail memory = 62500864 (61036K bytes)
Pentium Pro MTRR support enabled
Probing for devices on PCI bus 0:
chip0: <Intel 82443BX host to PCI bridge> rev 0x03 on pci0.0.0
chip1: <Intel 82443BX host to AGP bridge> rev 0x03 on pci0.1.0
chip2: <Intel 82371AB PCI to ISA bridge> rev 0x02 on pci0.4.0
ide_pci0: <Intel PIIX4 Bus-master IDE controller> rev 0x01 on pci0.4.1
chip3: <Intel 82371AB Power management controller> rev 0x02 on pci0.4.3
adw0: <AdvanSys ASC3550 SCSI controller> rev 0x00 int a irq 10 on pci0.10.0
adw0: SCSI ID 7, High & Low Termination Enabled, Queue Depth 253
pn0: <82c169 PNIC 10/100BaseTX> rev 0x20 int a irq 10 on pci0.11.0
pn0: Ethernet address: 00:a0:cc:28:a7:f1
pn0: autoneg complete, link status good (half-duplex, 10Mbps)
es1: <AudioPCI ES1371> rev 0x08 int a irq 11 on pci0.12.0
pcm1: using I/O space register mapping at 0xa400
es1371: codec vendor TRA revision 35
es1371: codec features Bass & Treble
es1371: stereo enhancement: no 3D stereo enhancement
Probing for devices on PCI bus 1:
vga0: <ATI model 4742 graphics accelerator> rev 0x5c int a irq 11 on pci1.0.0
Probing for PnP devices:
Probing for devices on the ISA bus:
sc0 on isa
sc0: VGA color <16 virtual consoles, flags=0x0>
atkbdc0 at 0x60-0x6f on motherboard
atkbd0 irq 1 on isa
psm0 irq 12 on isa
psm0: model Generic PS/2 mouse, device ID 0
sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
sio2 at 0x3e8-0x3ef irq 9 on isa
sio2: type 16550A
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1.44MB 3.5in
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc0: unit 0 (wd0): <IBM-DPTA-372050>, DMA, 32-bit, multi-block-16
wd0: 19574MB (40088160 sectors), 39770 cyls, 16 heads, 63 S/T, 512 B/S
ppc0 at 0x378 irq 7 flags 0x40 on isa
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/9 bytes threshold
lpt0: <generic printer> on ppbus 0
lpt0: Interrupt-driven port
plip0: <PLIP network interface> on ppbus 0
vga0 at 0x3b0-0x3df maddr 0xa0000 msize 131072 on isa
npx0 on motherboard
npx0: INT 16 interface
IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
IP Filter: initialized.  Default = pass all, Logging = enabled
Waiting 2 seconds for SCSI devices to settle
sa0 at adw0 bus 0 target 4 lun 0
sa0: <HP C1533A 9503> Removable Sequential Access SCSI-2 device 
sa0: 10.000MB/s transfers (10.000MHz, offset 8)
changing root device to da0s1a
da1 at adw0 bus 0 target 1 lun 0
da1: <SEAGATE ST32151N HP02> Fixed Direct Access SCSI-2 device 
da1: 10.000MB/s transfers (10.000MHz, offset 15), Tagged Queueing Enabled
da1: 2048MB (4194685 512 byte sectors: 255H 63S/T 261C)
da0 at adw0 bus 0 target 0 lun 0
da0: <IBM DCAS-34330 S65A> Fixed Direct Access SCSI-2 device 
da0: 20.000MB/s transfers (20.000MHz, offset 15)
da0: 4134MB (8467200 512 byte sectors: 255H 63S/T 527C)
cd0 at adw0 bus 0 target 5 lun 0
cd0: <PLEXTOR CD-ROM PX-32TS 1.02> Removable CD-ROM SCSI-2 device 
cd0: 20.000MB/s transfers (20.000MHz, offset 15)
cd0: cd present [1265076 x 512 byte records]
************************************************************************


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003122104.QAA46149>