Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2002 11:09:32 -0500
From:      "Xubin(Ben) He" <hexb@ele.uri.edu>
To:        <freebsd-scsi@freebsd.org>
Subject:   target mode.
Message-ID:  <001601c1b896$a96cce90$e6338083@dove>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0013_01C1B86C.BE2C0820
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
        I am trying to configure target mode under FreeBSD 4.5. The SCSI =
adapter is Adpatec 39160. I have a IBM SCSI disk connected to Channel A, =
id 1. The Adapter ID is set to 5. What I want to do is configure this =
adapter unning in target mode. I did it as follows:
1. add device targ, targbh, and options AHC_TMODE_ENABLE=3D0x01 as Jacob =
mentioned.
2. When I tried to add "options AHC_TARGET_MODE" in my conf file, I got =
an error message "unknown option:AHC_TARGET_MODE". So I added a line =
"define AHC_TARGET_MODE" in file aic7xxx.h as alternatives.
3. Recompile the new kernel.
4. Reboot the new kernel, I did see the following message:
        (targbh0:ahc0:0:-1:-1):lun now enabled for target mode
5. sh MAKEDEV targ0
5. But when I tried to run /usr/sahre/examples/scsi_target/scsi_target =
-p 0 -t 1 -l 0 I got the following messages:
        Configuring Target Mode
        targ0:ahc0:0:1:0: Lun now enabled for target mode
        TARGIODEBUG:Inappropriate ioctl for device
        targetfreeinstance:Unexpected CAM  STATUS 5
        targ0:ahc0:0:1:0: target mode disabled
        configuring Initiator Mode
       =20
I tried many other combinations, but the target mdoe still did not work. =
Could anybody point out what's the problem or anything I did wrong?Many =
thanks.
----------Ben

------=_NextPart_000_0013_01C1B86C.BE2C0820
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; I =
am trying=20
to configure target mode under FreeBSD 4.5. The SCSI adapter is Adpatec =
39160. I=20
have a IBM SCSI disk connected to Channel A, id 1. The Adapter ID is set =
to 5.=20
What I want to do is configure this adapter unning in target mode. I did =
it as=20
follows:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>1. add device targ, targbh, and options =

AHC_TMODE_ENABLE=3D0x01 as Jacob mentioned.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. When I tried to add "options =
AHC_TARGET_MODE" in=20
my conf file, I got an error message "unknown option:AHC_TARGET_MODE". =
So I=20
added a line "define AHC_TARGET_MODE" in file aic7xxx.h as=20
alternatives.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3. Recompile the new =
kernel.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4. Reboot the new kernel, I did see the =
following=20
message:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
(targbh0:ahc0:0:-1:-1):lun now enabled for target mode</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>5. sh MAKEDEV targ0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>5. But when I tried to run=20
/usr/sahre/examples/scsi_target/scsi_target -p 0 -t 1 -l 0 I got the =
following=20
messages:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
Configuring=20
Target Mode</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
targ0:ahc0:0:1:0: Lun now enabled for target mode</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
TARGIODEBUG:Inappropriate ioctl for device</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
targetfreeinstance:Unexpected CAM&nbsp; STATUS 5</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
targ0:ahc0:0:1:0:&nbsp;target mode disabled</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
configuring=20
Initiator Mode</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I tried many other combinations, but =
the target=20
mdoe still did not work. Could anybody point out what's the problem or =
anything=20
I did wrong?Many thanks.</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>----------Ben</FONT></DIV></BODY></HTML>

------=_NextPart_000_0013_01C1B86C.BE2C0820--


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?001601c1b896$a96cce90$e6338083>