Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2001 16:38:40 +1100 (EST)
From:      Iain Templeton <iain@research.canon.com.au>
To:        freebsd-scsi@freebsd.org
Subject:   Target mode on aic7880 controllers
Message-ID:  <Pine.LNX.4.10.10101171513170.10301-100000@blow.research.canon.com.au>

next in thread | raw e-mail | index | archive | help
Howdy folks,

I am having a bit of trouble with target mode on an aic7880 controller
and I am looking for some ideas as to why.

I have two Adaptec 2940UW cards in two different machines (annoyingly
both coming up as ahc1, but nevermind), one with id = 6, and one with id
= 7.

They are connected using the internal 68 pin connection using a flat
ribbon cable type of affair. The termination is set to automatic for
both. This is the only connection on both controller cards.

I'm putting the id7 controller into target mode using scsi_target from
/usr/share/examples/scsi_target.

From here I can do things like camcontrol reset using the id6 controller
which does reset the bus, and I see the message

ahc1: Somebody reset channel A

or likewise on the other machine (id7 controller).

However if I try and do a rescan of that bus, the target mode controller
does not respond to an inquiry command. It appears also that the CAM
system doesn't even get a message from ahc1 that such a command is sent.
In fact, I put a few extra printf's in aic7xxx.c and got nothing out of
them at all (inside the ahc_seqint() function looking for
HOST_MSG_LOOP).

I cannot use camcontrol to send CCB's to the target device either since
there is no pass through driver allocated for the device.

So what I'd like to know is:

1. Is target mode even known to work on aic7880's or aic7891's?

2. Is there any particular controller that target mode is known to work
well on. I know there are a few qlogic's that it is said to work on, but
for political reasons I can't buy one of them (or anything else for that
matter) right now. Plus, if we use SCSI for what I'm doing it will
probably be a motherboard controller, and I don't know if there are many
mb's with non-adaptec controllers.

I have tried the same thing using an aic7891 as both the target and
initiator and that didn't seem to work either.

I have also had an extra device hanging off the bus to make sure that it
is cabled/terminated properly. I seem to be able to find it (its a ZIP
drive) from both machines.

The interesting parts of dmesg for machine #1 (with id 6 are):

ahc0: <Adaptec aic7850 SCSI adapter> port 0xf400-0xf4ff mem
0xfedfa000-0xfedfafff irq 10 at device 8.0 on pci0
ahc0: No SEEPROM available.
ahc0: Using left over BIOS settings
ahc0: hardware scb 64 bytes; kernel scb 52 bytes; ahc_dma 8 bytes
ahc0: Downloading Sequencer Program... 429 instructions downloaded
aic7850: Single Channel A, SCSI Id=7, 3/255 SCBs
ahc1: <Adaptec 2940 Pro Ultra SCSI adapter> port 0xec00-0xecff mem
0xfedf9000-0xfedf9fff irq 11 at device 12.0 on pci0
ahc1: Reading SEEPROM...done.
ahc1: internal 50 cable not present, internal 68 cable is present
ahc1: external cable not present
ahc1: BIOS eeprom is present
ahc1: 68 pin termination Enabled
ahc1: 50 pin termination Enabled
ahc1: hardware scb 64 bytes; kernel scb 52 bytes; ahc_dma 8 bytes
ahc1: Downloading Sequencer Program... 428 instructions downloaded
aic7880: Wide Channel A, SCSI Id=6, 16/255 SCBs
        using shared irq11.


Similarly for machine #2 (with id 7);

ahc0: <Adaptec aic7890/91 Ultra2 SCSI adapter> port 0x1400-0x14ff mem
0xfa100000-0xfa100fff irq 11 at device 13.0 on pci0
ahc0: Reading SEEPROM...done.
ahc0: Manual LVD Termination
ahc0: BIOS eeprom is present
ahc0: Secondary High byte termination Enabled
ahc0: Secondary Low byte termination Enabled
ahc0: Primary Low Byte termination Enabled
ahc0: Primary High Byte termination Enabled
ahc0: Downloading Sequencer Program... 422 instructions downloaded
aic7890/91: Wide Channel A, SCSI Id=7, 32/255 SCBs
ahc1: <Adaptec 2940 Pro Ultra SCSI adapter> port 0x1c00-0x1cff mem
0xfa101000-0xfa101fff irq 11 at device 18.0 on pci0
ahc1: Reading SEEPROM...done.
ahc1: internal 50 cable not present, internal 68 cable is present
ahc1: external cable not present
ahc1: BIOS eeprom is present
ahc1: 68 pin termination Enabled
ahc1: 50 pin termination Enabled
ahc1: Downloading Sequencer Program... 428 instructions downloaded
aic7880: Wide Channel A, SCSI Id=7, 16/255 SCBs
        using shared irq11.

[ and later ]

Configuring Target Mode
 392 instructions downloaded
(targ0:ahc0:0:7:0): Lun now enabled for target mode
(targ0:ahc0:0:7:0): Target mode disabled
Configuring Initiator Mode
 422 instructions downloaded

In between the time that I turn target mode on and it gets turned back
off again I have run camcontrol rescan on the other machine, and it
doesn't make any difference.

Anyway, any suggestions greatfully accepted.

Iain



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10101171513170.10301-100000>