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

[-- Attachment #1 --]
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=0x01 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
        
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

[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 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:</FONT></DIV>
<DIV><FONT face=Arial size=2>1. add device targ, targbh, and options 
AHC_TMODE_ENABLE=0x01 as Jacob mentioned.</FONT></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Recompile the new kernel.</FONT></DIV>
<DIV><FONT face=Arial size=2>4. Reboot the new kernel, I did see the following 
message:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
(targbh0:ahc0:0:-1:-1):lun now enabled for target mode</FONT></DIV>
<DIV><FONT face=Arial size=2>5. sh MAKEDEV targ0</FONT></DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Configuring 
Target Mode</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
targ0:ahc0:0:1:0: Lun now enabled for target mode</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
TARGIODEBUG:Inappropriate ioctl for device</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
targetfreeinstance:Unexpected CAM&nbsp; STATUS 5</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
targ0:ahc0:0:1:0:&nbsp;target mode disabled</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; configuring 
Initiator Mode</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2>----------Ben</FONT></DIV></BODY></HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001601c1b896$a96cce90$e6338083>