Date: Fri, 25 Jun 2010 09:49:51 -0400 From: Leo Prasath Arulraj <leo@nec-labs.com> To: freebsd-scsi@freebsd.org Subject: Re: Scsi target mode with qlogic 2312 card help Message-ID: <4C24B3FF.2040208@nec-labs.com> In-Reply-To: <4C23655F.1070408@nec-labs.com> References: <4C23655F.1070408@nec-labs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I managed to get the scsi target mode running by changing the isp_freebsd.c driver code to explicity put the bus in target mode when it loads. Earlier it used to "defer putting the bus in target mode". The initiator reports "scsi scan: INQUIRY result too short (5), using 36" . Does anyone have pointers on this ? Thanks. Now , my scsi_target code when run on 0:0:0 shows : scsi_target: sending ccb (0x332) scsi_target: sending ccb (0x334) .... .... scsi_target: sending ccb (0x332) scsi_target: sending ccb (0x334) scsi_target: sending ccb (0x332) scsi_target: sending ccb (0x334) scsi_target: sending ccb (0x332) scsi_target: sending ccb (0x334) scsi_target: main loop beginning scsi_target: read ready scsi_target: event -1 done scsi_target: Working on ATIO 0x2826e740 scsi_target: tcmd_handle atio 0x2826e740 ctio 0x2826e8c0 atioflags 0x8000 scsi_target: INQUIRY from 1: 12 20 0 0 24 0 scsi_target: sending ccb (0x933) While the Linux initiator shows : QLogic Fibre Channel HBA Driver: 8.03.01-k10 qla2xxx 0000:01:06.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 qla2xxx 0000:01:06.0: Found an ISP2300, irq 16, iobase 0xf7e18000 qla2xxx 0000:01:06.0: Configuring PCI space... qla2xxx 0000:01:06.0: Configure NVRAM parameters... qla2xxx 0000:01:06.0: Verifying loaded RISC code... scsi(5): **** Load RISC code **** qla2xxx 0000:01:06.0: firmware: requesting ql2300_fw.bin scsi(5): Verifying Checksum of loaded RISC code. scsi(5): Checksum OK, start firmware. qla2xxx 0000:01:06.0: Allocated (412 KB) for firmware dump... scsi(5): Issue init firmware. DEBUG: detect hba 5 at address = f5ea0000 scsi5 : qla2xxx qla2xxx 0000:01:06.0: QLogic Fibre Channel HBA Driver: 8.03.01-k10 QLogic QLA2310 - ISP2300: PCI-X (66 MHz) @ 0000:01:06.0 hdma-, host#=5, fw=3.03.28 IPX scsi(5): Asynchronous P2P MODE received. scsi(5): Asynchronous LOOP UP (2 Gbps). qla2xxx 0000:01:06.0: LOOP UP detected (2 Gbps). scsi(5): Asynchronous PORT UPDATE. scsi(5): Port database changed ffff 0006 0000. scsi(5): Asynchronous PORT UPDATE ignored 0000/0006/0000. scsi(5): qla2x00_reset_marker() scsi(5): qla2x00_loop_resync() scsi(5): F/W Ready - OK scsi(5): fw_state=3 (8cc0, f5f8, 2e81, ffff) curr time=ffff30e2. scsi(5): Configure loop -- dpc flags =0x112e0 scsi(5): LOOP READY scsi(5): qla2x00_loop_resync - end scsi scan: INQUIRY result too short (5), using 36 qla2xxx_eh_abort(5): aborting sp f69bcf60 from RISC. pid=3. scsi(5): ABORT status detected 0x5-0x0. qla2xxx 0000:01:06.0: scsi(5:0:1): Abort command issued -- 1 3 2002. qla2xxx_eh_abort(5): aborting sp f69bcf60 from RISC. pid=3. scsi(5): ABORT status detected 0x5-0x0. qla2xxx 0000:01:06.0: scsi(5:0:1): Abort command issued -- 1 3 2002. qla2xxx 0000:01:06.0: scsi(5:0:1): DEVICE RESET ISSUED. qla2xxx 0000:01:06.0: scsi(5:0:1): DEVICE RESET SUCCEEDED. qla2xxx_eh_abort(5): aborting sp f69bcf60 from RISC. pid=3. scsi(5): ABORT status detected 0x5-0x0. qla2xxx 0000:01:06.0: scsi(5:0:1): Abort command issued -- 1 3 2002. qla2xxx 0000:01:06.0: scsi(5:0:1): TARGET RESET ISSUED. qla2xxx 0000:01:06.0: scsi(5:0:1): TARGET RESET SUCCEEDED. qla2xxx 0000:01:06.0: scsi(5:0:1): BUS RESET ISSUED. scsi(5): Asynchronous P2P MODE received. scsi(5): fcport-0 - port retry count: 29 remaining scsi(5): qla2x00_reset_marker() scsi(5): fcport-0 - port retry count: 28 remaining scsi(5): fcport-0 - port retry count: 27 remaining scsi(5): fcport-0 - port retry count: 26 remaining scsi(5): fcport-0 - port retry count: 25 remaining scsi(5): fcport-0 - port retry count: 24 remaining scsi(5): fcport-0 - port retry count: 23 remaining On 06/24/2010 10:02 AM, Leo Prasath Arulraj wrote: > Hi, > > I am trying to run the /usr/share/examples/scsi_target example scsi > emulator code using : > > isp0: <Qlogic ISP 2312 PCI FC-AL Adapter> port 0xdc00-0xdcff mem > 0xfcf00000-0xfcf00fff irq 16 at device 6.0 on pci1 > > cards. I am new to this but have spent about 2 weeks trying to get > this working. > > Can someone tell me if I am missing something very basic ? > > Setup: > > 2 machines both with qlogic isp 2312 cards connected with a fibre > channel. Both machines run FreeBSD 8. > > On the target machine : the kernel options are : > > # SCSI peripherals > device scbus # SCSI bus (required for SCSI) > device targ > device targbh > device ispfw > options CAMDEBUG > options > CAM_DEBUG_FLAGS=CAM_DEBUG_INFO|CAM_DEBUG_CDB|CAM_DEBUG_TRACE|CAM_DEBUG_SUBTRACE|CAM_DEBUG_XPT|CAM_DEBUG_PERIPH > > options AHC_TMODE_ENABLE=0x8 > options ISP_TARGET_MODE > options VFS_AIO > > I have tried both with and without setting the following hints : > > hint.isp.0.iid="0" > hint.isp.0.role="target" > hint.isp.0.portwnn="w0000000000000000" > hint.isp.0.nodewnn="w0000000000000001" > > I run the command : > > ./scsi_target -d 0:0:0 ./vol > > and get the output with a list of INOT and ATIOs followed by a final > "entering main loop" message. > > But when I run camcontrol rescan all on the other machine, the > emulated disk does not show up. I tried both with and without these > hints : > > hint.isp.0.topology="nport" > hint.isp.0.iid="0" > hint.isp.0.portwnn="w0000000000000002" > hint.isp.0.nodewnn="w0000000000000003" > hint.isp.0.role="initiator" > > Any help is really appreciated. > > Thanks, > Leo. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C24B3FF.2040208>