On Fri, 2012-11-02 at 13:58 +0000, Chris Boot wrote: > Hi folks, > Hi BootC! > I have recently acquired a couple of QLE2460 HBAs in order to play > around with the FC target. I have simply strung them together with an > LC-LC fibre pair, and it appears that as soon as I plug the fibre into > both ends the link comes up: I get an entry appearing in > /sys/class/fc_remote_ports/ on both machines that contains correct > information about the node on the other end of the link (WWPNs, etc...). > You'll want to go ahead and enable ql2xextended_error_logging=0x7fffffff at modprobe time on both sides to understand what's going on. Note this will generate a decent amount of ring buffer output. ;) > On the target server, I have set up a qla2xxx target using targetcli. > This machine is running the 3.6.5 kernel from kernel.org. Btw, just a separate heads up here. You'll also want to apply the following one-liner patch to fix a v3.7-rc1 regression bug that managed to make it's way into v3.6 stable: http://git.kernel.org/?p=linux/kernel/git/nab/target-pending.git;a=commitdiff;h=dea5f0998aa82bdeca260b87c653db11e91329b2 > On the > initiator, I am running Debian Wheezy's 3.2 kernel (based on 3.2.23). I > have upgraded to the latest bootcode and firmware available on the > QLogic web site (5.07.00), and am using the latest ql2400_fw.bin > available in Wheezy (5.06.05). > > I have correctly set 'options qla2xxx qlini_mode=disabled' in > /etc/modprobe.d/local.conf. > > I have set up my target as follows (dump from /etc/target/qla2xxx_start.sh): > > modprobe tcm_qla2xxx > mkdir /sys/kernel/config/target/qla2xxx > #### qla2xxx Target Ports > mkdir -p > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/lun/lun_0 > ln -s > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/lun/lun_0/../../../../../../target/core/iblock_0/ripley > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/lun/lun_0/77654be314 > #### Attributes for qla2xxx Target Portal Group > echo 0 > > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/attrib/prod_mode_write_protect > echo 1 > > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/attrib/demo_mode_write_protect > echo 1 > > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/attrib/cache_dynamic_acls > echo 1 > > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/attrib/generate_node_acls > #### Parameters for qla2xxx Target Portal Group > #### qla2xxx Initiator ACLs for qla2xxx Target Portal Group > mkdir -p > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/acls/21:00:00:1b:32:15:f4:1b > #### qla2xxx Initiator ACL authentication information > #### qla2xxx Initiator ACL TPG attributes > #### qla2xxx Initiator LUN ACLs for iSCSI Target Portal Group > mkdir -p > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/acls/21:00:00:1b:32:15:f4:1b/lun_0 > ln -s > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/acls/21:00:00:1b:32:15:f4:1b/lun_0/../../../../../../../target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/lun/lun_0 > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/acls/21:00:00:1b:32:15:f4:1b/lun_0/590861028a > echo 0 > > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/acls/21:00:00:1b:32:15:f4:1b/lun_0/write_protect > #### Trigger to enable qla2xxx Target Portal Group > echo 1 > > /sys/kernel/config/target/qla2xxx/21:00:00:1b:32:11:a8:24/tpgt_1/enable > > On the target, I see the following messages in dmesg during boot: > > [ 3.215515] qla2xxx [0000:00:00.0]-0005: : QLogic Fibre Channel HBA > Driver: 8.04.00.03-k. > [ 3.251698] qla2xxx [0000:02:00.0]-001d: : Found an ISP2432 irq 17 > iobase 0xffffc9000185c000. > [ 3.286645] qla2xxx 0000:02:00.0: irq 47 for MSI/MSI-X > [ 3.286657] qla2xxx 0000:02:00.0: irq 48 for MSI/MSI-X > [ 3.647980] scsi0 : qla2xxx > [ 3.678156] qla2xxx [0000:02:00.0]-00fb:0: QLogic QLE2460 - QLogic > 4GB FC Single-Port PCI-E HBA for IBM System x. > [ 3.678161] qla2xxx [0000:02:00.0]-00fc:0: ISP2432: PCIe (2.5GT/s x4) > @ 0000:02:00.0 hdma+ host#=0 fw=5.06.05 (9496). > > Once the target is set up, and I plug in the fibre: > > [ 405.443831] qla2xxx [0000:02:00.0]-00af:0: Performing ISP error > recovery - ha=ffff880427b40000. > [ 406.364280] qla2xxx [0000:02:00.0]-505f:0: Link is operational (4 Gbps). > [ 406.545311] qla2xxx [0000:02:00.0]-0121:0: Failed to enable receiving > of RSCN requests: 0x2. > > And that's it on the target side. > <nod>, that looks fine. Note the RSCN failure here is expected when running in Point-to-Point mode. > On the initiator side, things are less pretty: when booting the machine > with the fibre plugged-in, the adapter BIOS complains about "FC device > no found" or similar. Booting Linux with the fibre plugged in basically > hangs the boot process, so I unplugged it and booted up. The following > messages are printed at boot: > > [ 1.669629] qla2xxx [0000:00:00.0]-0005: : QLogic Fibre Channel HBA > Driver: 8.03.07.12-k. > [ 1.670130] qla2xxx 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> > IRQ 17 > [ 1.670670] qla2xxx [0000:02:00.0]-001d: : Found an ISP2432 irq 17 > iobase 0xffffc900065d8000. > [ 1.671279] qla2xxx 0000:02:00.0: irq 43 for MSI/MSI-X > [ 1.671284] qla2xxx 0000:02:00.0: irq 44 for MSI/MSI-X > [ 1.671339] qla2xxx [0000:02:00.0]-0040:0: Configuring PCI space... > [ 1.671713] qla2xxx 0000:02:00.0: setting latency timer to 64 > [ 1.703281] qla2xxx [0000:02:00.0]-0061:0: Configure NVRAM parameters... > [ 1.756123] qla2xxx [0000:02:00.0]-0078:0: Verifying loaded RISC code... > [ 1.790028] qla2xxx [0000:02:00.0]-0092:0: Loading via request-firmware. > [ 2.084214] qla2xxx [0000:02:00.0]-00c3:0: Allocated (64 KB) EFT ... > [ 2.084263] qla2xxx [0000:02:00.0]-00c5:0: Allocated (1285 KB) for > firmware dump. > [ 2.104239] scsi0 : qla2xxx > [ 2.150005] qla2xxx [0000:02:00.0]-00fa:0: QLogic Fibre Channed HBA > Driver: 8.03.07.12-k. > [ 2.150007] qla2xxx [0000:02:00.0]-00fb:0: QLogic QLE2460 - QLogic > 4GB FC Single-Port PCI-E HBA for IBM System x. > [ 2.150016] qla2xxx [0000:02:00.0]-00fc:0: ISP2432: PCIe (2.5GT/s x4) > @ 0000:02:00.0 hdma+ host#=0 fw=5.06.05 (9496). > [ 24.256961] qla2xxx [0000:02:00.0]-8038:0: Cable is unplugged... > [ 24.257264] qla2xxx [0000:02:00.0]-803b:0: Firmware ready **** FAILED > ****. > > When I plug in the fibre: Mmmm, I think that's not good.. CCing Qlogic folks here: > > Nov 2 12:46:42 ripley kernel: [ 9663.854559] qla2xxx > [0000:02:00.0]-500c:0: LIP reset occurred (f8ef). > Nov 2 12:46:42 ripley kernel: [ 9663.908456] qla2xxx > [0000:02:00.0]-5009:0: LIP occurred (f8ef). > Nov 2 12:46:42 ripley kernel: [ 9663.933152] qla2xxx > [0000:02:00.0]-500a:0: LOOP UP detected (4 Gbps). > Nov 2 12:47:03 ripley kernel: [ 9684.956764] qla2xxx > [0000:02:00.0]-801c:0: Abort command issued -- 1 2002. > Nov 2 12:47:14 ripley kernel: [ 9695.939008] qla2xxx > [0000:02:00.0]-801c:0: Abort command issued -- 1 2002. > Nov 2 12:47:14 ripley kernel: [ 9695.939020] qla2xxx > [0000:02:00.0]-8009:0: DEVICE RESET ISSUED for id 0 lun 0 > cmd=ffff88039d0e1280. > Nov 2 12:47:18 ripley kernel: [ 9699.947348] qla2xxx > [0000:02:00.0]-800c:0: do_reset failed for cmd=ffff88039d0e1280. > Nov 2 12:47:18 ripley kernel: [ 9699.947355] qla2xxx > [0000:02:00.0]-800f:0: DEVICE RESET FAILED: Task management failed for > id 0 lun 0 cmd=000000000000001c. > Nov 2 12:47:18 ripley kernel: [ 9699.947363] qla2xxx > [0000:02:00.0]-8009:0: TARGET RESET ISSUED for id 0 lun 0 > cmd=ffff88039d0e1280. > Nov 2 12:47:22 ripley kernel: [ 9703.971618] qla2xxx > [0000:02:00.0]-800c:0: do_reset failed for cmd=ffff88039d0e1280. > Nov 2 12:47:22 ripley kernel: [ 9703.971625] qla2xxx > [0000:02:00.0]-800f:0: TARGET RESET FAILED: Task management failed for > id 0 lun 0 cmd=ffff88040a72a2c0. > Nov 2 12:47:22 ripley kernel: [ 9703.971632] qla2xxx > [0000:02:00.0]-8012:0: BUS RESET ISSUED for id 0 lun 0. > Nov 2 12:47:26 ripley kernel: [ 9707.996606] qla2xxx > [0000:02:00.0]-802b:0: BUS RESET SUCCEDED. > Nov 2 12:47:26 ripley kernel: [ 9708.002375] qla2xxx > [0000:02:00.0]-500c:0: LIP reset occurred (0). > Nov 2 12:47:26 ripley kernel: [ 9708.003367] qla2xxx > [0000:02:00.0]-5009:0: LIP occurred (0). > Nov 2 12:47:47 ripley kernel: [ 9728.961850] qla2xxx > [0000:02:00.0]-801c:0: Abort command issued -- 1 2002. > Nov 2 12:47:47 ripley kernel: [ 9728.961859] qla2xxx > [0000:02:00.0]-8018:0: ADAPTER RESET ISSUED for id 0 lun 0. > Nov 2 12:47:47 ripley kernel: [ 9728.961865] qla2xxx > [0000:02:00.0]-00af:0: Performing ISP error recovery - ha=ffff880409aa0000. > Nov 2 12:47:47 ripley kernel: [ 9729.013775] qla2xxx > [0000:02:00.0]-0092:0: Loading via request-firmware. > Nov 2 12:47:48 ripley kernel: [ 9729.804186] qla2xxx > [0000:02:00.0]-500c:0: LIP reset occurred (f8ef). > Nov 2 12:47:48 ripley kernel: [ 9730.265063] qla2xxx > [0000:02:00.0]-5009:0: LIP occurred (f8ef). > Nov 2 12:47:48 ripley kernel: [ 9730.290097] qla2xxx > [0000:02:00.0]-500a:0: LOOP UP detected (4 Gbps). > Nov 2 12:47:49 ripley kernel: [ 9730.450907] qla2xxx 0000:02:00.0: > qla2xxx_eh_host_reset: reset succeeded. > Nov 2 12:48:09 ripley kernel: [ 9750.415604] qla2xxx > [0000:02:00.0]-801c:0: Abort command issued -- 1 2002. > Nov 2 12:48:09 ripley kernel: [ 9750.415611] scsi 0:0:0:0: Device > offlined - not ready after error recovery > > The above is repeated over and over, and the exported LUN never appears. > > I should add I am a complete FC newbie, so there may be something > obvious I've missed above. All help and pointers gratefully received. > > Any ideas? Thanks for reporting ! --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html