From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 22 07:37:15 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBA5EA97; Tue, 22 Jul 2014 07:37:15 +0000 (UTC) Received: from mail-vc0-x230.google.com (mail-vc0-x230.google.com [IPv6:2607:f8b0:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 698D42669; Tue, 22 Jul 2014 07:37:15 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id id10so9404610vcb.35 for ; Tue, 22 Jul 2014 00:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=VUxw5qlgHyuHnhT9RRogIgzrono5Vp+RSMmbK1G18Wk=; b=luwFGJiYzEJl/MV8xMOEND5JmSWSjy5qaxrE8jmWH4ArmOR0irHhEGltFxupdV1YzJ fU/t6U3rBrhsh0yRy2uErrjjgpLbW+nKzKAVvFNf5NOiLsOP0cTIL8/HAZ4cQRkb/VIN /d0VYOdsdA722JGkFNnfvBWdCR1fhCOsAtQibeVWILEpFDZnXPKF7ee8GgKEjYPDDBwA Dkzh+bacXk6bk82BXHCZbjzFaIvCkDLzNhtwaduV+0AkTobnubSJaCUdDcbJLZUvEKMY +J81djgHOD276OXAOo5NMEGAZdpoOVCDddRQKjfT8YQyDEQWXTCv605bIjRWIBsMcD/2 Am3A== X-Received: by 10.52.184.199 with SMTP id ew7mr31515303vdc.44.1406014633905; Tue, 22 Jul 2014 00:37:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.156.71 with HTTP; Tue, 22 Jul 2014 00:36:53 -0700 (PDT) From: bharat singh Date: Tue, 22 Jul 2014 13:06:53 +0530 Message-ID: Subject: QLogic 24xx FC HBAs not working fine with CAM Target Layer To: freebsd-scsi@freebsd.org, freebsd-drivers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2014 07:37:15 -0000 Hello, I am trying to use a new firmware on a single port FC HBA with freebsd9 stable, but facing the firmware issue. Card came with firmware version 5.5.0 (isp0: Board Type 2422, Chip Revision 0x3, resident F/W Revision 5.5.0) I upgraded the firmware to 5.6.5, and disabled firmware flag by setting "fwload_disable=YES" flag in /boot/device.hints to retain the newer firmware. On subsequent reboots the firmware fails to initialize and throws isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) [root@Ctrl4 ~]# ctladm port -l Port Online Type Name pp vp WWNN WWPN Speed Vendor 0 YES IOCTL CTL ioctl 0 0 0 0 0 1 YES INTERNAL ctl2cam 0 0 0x5000000edac0c700 0x5000000edac0c702 0 2 YES INTERNAL CTL internal 0 0 0 0 0 * It's not showing FC port 1448 Jul 22 11:05:37 Ctrl4 kernel: isp0: IN mbox 0 = 0x0008 1450 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 1451 Jul 22 11:05:37 Ctrl4 last message repeated 999 times 1454 Jul 22 11:05:37 Ctrl4 kernel: isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ isp_reset:1045) 1456 Jul 22 11:05:37 Ctrl4 kernel: isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) 1458 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 1460 Jul 22 11:05:37 Ctrl4 kernel: Trying to mount root from ufs:/dev/label/root_0 [rw]... 1462 Jul 22 11:05:37 Ctrl4 kernel: device_attach: isp0 attach returned 6 1464 Jul 22 11:05:37 Ctrl4 kernel: isp0: port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci 3 1465 Jul 22 11:05:37 Ctrl4 kernel: isp0: loaded firmware isp_2400_multi from dmesg: isp0: RISC2HOST ISR 0x40000101 isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ isp_reset:1045) isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) isp0: RISC2HOST ISR 0x40000101 device_attach: isp0 attach returned 6 isp0: port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci3 isp0: loaded firmware isp_2400_multi isp0: set PCI latency to 64 isp0: request/result area @ 0xf700000/0x38000 isp0: scdma @ 0xf6b9000/0x1000 isp0: IN mbox 0 = 0x0000 isp0: RISC2HOST ISR 0x0 isp0: RISC2HOST ISR 0x40008001 isp0: OUT mbox 0 = 0x4000 isp0: IN mbox 0 = 0x0006 isp0: IN mbox 1 = 0xdead The workaround is to enable the firmware flash by setting "fwload_disable=NO", but that doesn't serves my purpose. Is there a way to avoid the issue without a firmware flash on every reboot ? Moreover i have seen the issue on older firmware 5.5.0 also, as soon I disable the firmware flash and reboot. Some old threads, but not helping much. http://lists.freebsd.org/pipermail/freebsd-scsi/2010-April/004215.html Any help is deeply appreciated. -- Bharat Singh From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 03:43:07 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B9CA65B for ; Wed, 23 Jul 2014 03:43:07 +0000 (UTC) Received: from mail-pd0-x234.google.com (mail-pd0-x234.google.com [IPv6:2607:f8b0:400e:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 622FC2871 for ; Wed, 23 Jul 2014 03:43:07 +0000 (UTC) Received: by mail-pd0-f180.google.com with SMTP id y13so784455pdi.11 for ; Tue, 22 Jul 2014 20:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=kPsd/3y5D9Op5ljdRgzIiKVA2dcyb0sMK8GgEUNm7q0=; b=tdiUkdvH8iGW+B+jVseHV/0XL8wazP6EItSBHjPfHnUOr9k+MrPMeUxdqCuVMOCaAj t1ICiRU3pdepDZNzfRQOcXEa2+a+jDYv3d1jG+RR70kL1h9D4ovJSF58rHYL5CnI8lBm hg1LLJV+G2nA6h+w5l4auN1PpYZsfnW9H36DJBr0KWp3Mm3e9Qu5gV0TrcvFLs/6VD0C aC5GdAHaDiuFbZbDizJKfqKeKfp/K0rU6KdAmIEICRQJmHiEImgGT9lGRnbc7Nyao+JX xpBJ3t9dnO4ahdSdkxohGBDzn3YUM0/fC7iEYOQQAx3R19YQJ9LjMjaW5TzLj6rBTMLm Q7lw== X-Received: by 10.70.35.143 with SMTP id h15mr6929328pdj.5.1406086986925; Tue, 22 Jul 2014 20:43:06 -0700 (PDT) Received: from [192.168.10.153] (114-34-221-39.HINET-IP.hinet.net. [114.34.221.39]) by mx.google.com with ESMTPSA id wa14sm3743372pac.18.2014.07.22.20.43.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 20:43:06 -0700 (PDT) From: Chen Wen Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: usr.sbin/ctld/login.c do not reply TargetPortalGroupTag in Login response Message-Id: <1C0DBE89-1D7B-458C-AB91-F17D0DD9C717@gmail.com> Date: Wed, 23 Jul 2014 11:43:02 +0800 To: freebsd-scsi@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 03:43:07 -0000 Hi I am a mac user, when I try to use xtendsan iSCSI initiator to connect = native iSCSI target, I found that the login response pdu do not have = TargetPortalGroupTag key-pair. xtendsan told me TargetPortalGroupTag is missing and disconnected. I try to do a workaround to it and it works. Add some codes in usr.sbin/ctld/login.c:login_negotiate() > login_negotiate(struct connection *conn, struct pdu *request) > { > struct pdu *response; > struct iscsi_bhs_login_response *bhslr2; > struct keys *request_keys, *response_keys; > int i; > bool skipped_security; char *portal_group_tag; int rv; >=20 > if (request =3D=3D NULL) { > log_debugx("beginning parameter negotiation; " > "waiting for Login PDU"); > request =3D login_receive(conn, false); > skipped_security =3D false; > } else > skipped_security =3D true; >=20 > request_keys =3D keys_new(); > keys_load(request_keys, request); >=20 > response =3D login_new_response(request); > bhslr2 =3D (struct iscsi_bhs_login_response = *)response->pdu_bhs; > bhslr2->bhslr_flags |=3D BHSLR_FLAGS_TRANSIT; > bhslr2->bhslr_tsih =3D htons(0xbadd); > login_set_csg(response, BHSLR_STAGE_OPERATIONAL_NEGOTIATION); > login_set_nsg(response, BHSLR_STAGE_FULL_FEATURE_PHASE); > response_keys =3D keys_new(); if (conn->conn_session_type =3D=3D CONN_SESSION_TYPE_NORMAL) { if (conn->conn_target->t_alias !=3D NULL) keys_add(response_keys, "TargetAlias", conn->conn_target->t_alias); rv =3D asprintf(&portal_group_tag, "%d", conn->conn_portal->p_portal_group->pg_tag); if (rv <=3D 0) log_err(1, "asprintf"); keys_add(response_keys, "TargetPortalGroupTag", portal_group_tag); free(portal_group_tag); } =20 > for (i =3D 0; i < KEYS_MAX; i++) { > if (request_keys->keys_names[i] =3D=3D NULL) > break; >=20 > login_negotiate_key(request, = request_keys->keys_names[i], > request_keys->keys_values[i], skipped_security, > response_keys); > } I don=92t read whole iSCSI RFC, is this right to add missing = TargetPortalGroupTag? Maybe you have better solution to fix this, please help me and thanks.= From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 03:57:16 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 030447FD for ; Wed, 23 Jul 2014 03:57:16 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE5D42970 for ; Wed, 23 Jul 2014 03:57:15 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id et14so853183pad.37 for ; Tue, 22 Jul 2014 20:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=2ii6uRxnIErYQSia6FP+HqJZssnKguv9iBac9pf7DME=; b=juj7QguM0lxGJTwMnNCPtMSoxmerfUWhYU6G2FkhbXGZGL32SdQr4b+7SFh8v7myH1 Q2gvtxxDtOPgP9goB+NlmxTqbue51/f41IbwK+dsa3mWFDXBmbgrmhBp9IXFLwVpAwRH yOPOxGQx97smf9bTpgnmdAgAzedEe5IoxSvhj7g0gcKs+Rd/cJqBUf5rDwrWgjC9rs1r LYxgmMklJ8GLntLCN7XNsjJDTDZzc1es49TfooUJBbMf7dlb88n7dLIc0QU+SsBpL795 7AyV0fjdw7VHQphXgXP+yctuhnv96d6JPemYQkqjGrNFFNiiwfddhe5UCda1VhBf+Dkt xfzg== X-Received: by 10.68.92.195 with SMTP id co3mr27907239pbb.36.1406087835362; Tue, 22 Jul 2014 20:57:15 -0700 (PDT) Received: from [192.168.10.153] (114-34-221-39.HINET-IP.hinet.net. [114.34.221.39]) by mx.google.com with ESMTPSA id id4sm785155pbb.57.2014.07.22.20.57.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 20:57:14 -0700 (PDT) From: Chen Wen Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: disable iSCSI ping while ping_timeout=0 Message-Id: Date: Wed, 23 Jul 2014 11:57:10 +0800 To: freebsd-scsi@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 03:57:16 -0000 Hi I install VMWare ESXi 5.5 in FreeBSD native iSCSI lun and boot from = san(iPXE). I found NOP-out will make iPXE disconnect this session.=20 iPXE=92s wiki page says that you can disable NOP-out when you using LIO. I suggest that we do the same thing while user sets ping_timeout=3D0. > static void > cfiscsi_callout(void *context) > { > struct icl_pdu *cp; > struct iscsi_bhs_nop_in *bhsni; > struct cfiscsi_session *cs; >=20 > cs =3D context; >=20 > if (cs->cs_terminating) > return; >=20 > callout_schedule(&cs->cs_callout, 1 * hz); >=20 if (ping_timeout =3D=3D 0) return; >=20 > CFISCSI_SESSION_LOCK(cs); > cs->cs_timeout++; > CFISCSI_SESSION_UNLOCK(cs); From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 04:48:36 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A191DAE; Wed, 23 Jul 2014 04:48:36 +0000 (UTC) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF542D17; Wed, 23 Jul 2014 04:48:35 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.9/8.14.2) with ESMTP id s6N4MxiJ015145; Tue, 22 Jul 2014 22:22:59 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.9/8.14.9/Submit) id s6N4Mw4m015144; Tue, 22 Jul 2014 22:22:58 -0600 (MDT) (envelope-from ken) Date: Tue, 22 Jul 2014 22:22:58 -0600 From: "Kenneth D. Merry" To: bharat singh Subject: Re: QLogic 24xx FC HBAs not working fine with CAM Target Layer Message-ID: <20140723042258.GA15089@nargothrond.kdm.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-scsi@freebsd.org, freebsd-drivers@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 04:48:36 -0000 On Tue, Jul 22, 2014 at 13:06:53 +0530, bharat singh wrote: > Hello, > > I am trying to use a new firmware on a single port FC HBA with freebsd9 > stable, but facing the firmware issue. > > Card came with firmware version 5.5.0 > (isp0: Board Type 2422, Chip Revision 0x3, resident F/W Revision 5.5.0) > > I upgraded the firmware to 5.6.5, and disabled firmware flag by setting > "fwload_disable=YES" flag in /boot/device.hints to retain the newer > firmware. > On subsequent reboots the firmware fails to initialize and throws > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) In general, you want to load the ispfw module or compile it into your kernel. The driver was tested with the firmware included in the module, and may not work as well (or at all) with a different version. If you know what changed between the firmware version compiled into the ispfw module and the one you want to run, you can make any necessary driver modifications. > [root@Ctrl4 ~]# ctladm port -l > Port Online Type Name pp vp WWNN WWPN > Speed Vendor > 0 YES IOCTL CTL ioctl 0 0 0 0 > 0 > 1 YES INTERNAL ctl2cam 0 0 0x5000000edac0c700 > 0x5000000edac0c702 0 > 2 YES INTERNAL CTL internal 0 0 0 0 > 0 > > * It's not showing FC port You need to compile your kernel with: options ISP_TARGET_MODE=1 Otherwise you won't get target mode functionality in the isp(4) driver. > 1448 Jul 22 11:05:37 Ctrl4 kernel: isp0: IN mbox 0 = 0x0008 > 1450 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > 1451 Jul 22 11:05:37 Ctrl4 last message repeated 999 times > 1454 Jul 22 11:05:37 Ctrl4 kernel: isp0: Polled Mailbox Command (0x8) > Timeout (100000us) (started @ isp_reset:1045) > 1456 Jul 22 11:05:37 Ctrl4 kernel: isp0: Mailbox Command 'ABOUT FIRMWARE' > failed (TIMEOUT) > 1458 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > 1460 Jul 22 11:05:37 Ctrl4 kernel: Trying to mount root from > ufs:/dev/label/root_0 [rw]... > 1462 Jul 22 11:05:37 Ctrl4 kernel: device_attach: isp0 attach returned 6 > 1464 Jul 22 11:05:37 Ctrl4 kernel: isp0: Adapter> port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at device 0.0 > on pci 3 > 1465 Jul 22 11:05:37 Ctrl4 kernel: isp0: loaded firmware isp_2400_multi > > from dmesg: > isp0: RISC2HOST ISR 0x40000101 > isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ > isp_reset:1045) > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > isp0: RISC2HOST ISR 0x40000101 > device_attach: isp0 attach returned 6 > isp0: port 0x3000-0x30ff mem > 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci3 > isp0: loaded firmware isp_2400_multi > isp0: set PCI latency to 64 > isp0: request/result area @ 0xf700000/0x38000 > isp0: scdma @ 0xf6b9000/0x1000 > isp0: IN mbox 0 = 0x0000 > isp0: RISC2HOST ISR 0x0 > isp0: RISC2HOST ISR 0x40008001 > isp0: OUT mbox 0 = 0x4000 > isp0: IN mbox 0 = 0x0006 > isp0: IN mbox 1 = 0xdead > > The workaround is to enable the firmware flash by setting > "fwload_disable=NO", but that doesn't serves my purpose. > > Is there a way to avoid the issue without a firmware flash on every reboot ? > Moreover i have seen the issue on older firmware 5.5.0 also, as soon I > disable the firmware flash and reboot. If I recall correctly, the firmware that is loaded on boot is loaded into RAM on the card, not flashed. I don't think it affects what is actually flashed onto the board. So that really is what you want to do. Also, just FYI, in past testing with 4Gb Qlogic boards I was limited to 256MB/sec in each direction when I tried them out. I haven't seen the same limitation with the 8Gb boards. It has been a few years since I tried out target mode with a 4Gb board, but keep an eye out for that once you get it running. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 07:03:37 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C04B06B7; Wed, 23 Jul 2014 07:03:37 +0000 (UTC) Received: from mail-vc0-x231.google.com (mail-vc0-x231.google.com [IPv6:2607:f8b0:400c:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 484A9286B; Wed, 23 Jul 2014 07:03:37 +0000 (UTC) Received: by mail-vc0-f177.google.com with SMTP id hy4so1360982vcb.8 for ; Wed, 23 Jul 2014 00:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=K5MFJFJ271vGIjJ02KnDAd9QEXBiwP0H6ZtHLj/714o=; b=0OtFRTnEU+qBgVbhTU3rs/ShO0nr7vgSSluLReuIfdedH7d4anlNH37t9FM74UdlFW OKtakWqYeKZwwUuzOSCZaD6rX8xueJrWo4FTh+3ZwBjDbP8Bb/ynnEfXdoOzP4vwFo0n 7oubSjzqwEsEtjpSgo0e3A8IHrzFpKjrEUh2hzjCk3/0LPov4Z+R1H8YpAsOobACN5eF GM+M9KQ9CE3i78ilzQKGQcqlPpIbeJwkhcZa6pzAWcdiw6B65ycHiq+51J8ya7i4sPnb 2qDdb0HCgBDTqSFk/UsbOPFUTxGpZFug4baPHqqqJlLpO8zA27n5Mc+Sc72izqQFmP4w Pp3A== X-Received: by 10.220.131.207 with SMTP id y15mr1089067vcs.71.1406099016297; Wed, 23 Jul 2014 00:03:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.156.71 with HTTP; Wed, 23 Jul 2014 00:03:16 -0700 (PDT) In-Reply-To: <20140723042258.GA15089@nargothrond.kdm.org> References: <20140723042258.GA15089@nargothrond.kdm.org> From: bharat singh Date: Wed, 23 Jul 2014 12:33:16 +0530 Message-ID: Subject: Re: QLogic 24xx FC HBAs not working fine with CAM Target Layer To: "Kenneth D. Merry" , mjacob@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: freebsd-scsi@freebsd.org, freebsd-drivers@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 07:03:37 -0000 On Wed, Jul 23, 2014 at 9:52 AM, Kenneth D. Merry wrote: > On Tue, Jul 22, 2014 at 13:06:53 +0530, bharat singh wrote: > > Hello, > > > > I am trying to use a new firmware on a single port FC HBA with freebsd9 > > stable, but facing the firmware issue. > > > > Card came with firmware version 5.5.0 > > (isp0: Board Type 2422, Chip Revision 0x3, resident F/W Revision 5.5.0) > > > > I upgraded the firmware to 5.6.5, and disabled firmware flag by setting > > "fwload_disable=YES" flag in /boot/device.hints to retain the newer > > firmware. > > On subsequent reboots the firmware fails to initialize and throws > > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > > In general, you want to load the ispfw module or compile it into your > kernel. The driver was tested with the firmware included in the module, > and may not work as well (or at all) with a different version. > > If you know what changed between the firmware version compiled into the > ispfw module and the one you want to run, you can make any necessary driver > modifications. > > > [root@Ctrl4 ~]# ctladm port -l > > Port Online Type Name pp vp WWNN WWPN > > Speed Vendor > > 0 YES IOCTL CTL ioctl 0 0 0 0 > > 0 > > 1 YES INTERNAL ctl2cam 0 0 0x5000000edac0c700 > > 0x5000000edac0c702 0 > > 2 YES INTERNAL CTL internal 0 0 0 0 > > 0 > > > > * It's not showing FC port > > You need to compile your kernel with: > > options ISP_TARGET_MODE=1 > > Otherwise you won't get target mode functionality in the isp(4) driver. > Yes, ISP is enabled for target functionality. > > > 1448 Jul 22 11:05:37 Ctrl4 kernel: isp0: IN mbox 0 = 0x0008 > > 1450 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > > 1451 Jul 22 11:05:37 Ctrl4 last message repeated 999 times > > 1454 Jul 22 11:05:37 Ctrl4 kernel: isp0: Polled Mailbox Command (0x8) > > Timeout (100000us) (started @ isp_reset:1045) > > 1456 Jul 22 11:05:37 Ctrl4 kernel: isp0: Mailbox Command 'ABOUT FIRMWARE' > > failed (TIMEOUT) > > 1458 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > > 1460 Jul 22 11:05:37 Ctrl4 kernel: Trying to mount root from > > ufs:/dev/label/root_0 [rw]... > > 1462 Jul 22 11:05:37 Ctrl4 kernel: device_attach: isp0 attach returned 6 > > 1464 Jul 22 11:05:37 Ctrl4 kernel: isp0: > Adapter> port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at device > 0.0 > > on pci 3 > > 1465 Jul 22 11:05:37 Ctrl4 kernel: isp0: loaded firmware isp_2400_multi > > > > from dmesg: > > isp0: RISC2HOST ISR 0x40000101 > > isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ > > isp_reset:1045) > > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > > isp0: RISC2HOST ISR 0x40000101 > > device_attach: isp0 attach returned 6 > > isp0: port 0x3000-0x30ff mem > > 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci3 > > isp0: loaded firmware isp_2400_multi > > isp0: set PCI latency to 64 > > isp0: request/result area @ 0xf700000/0x38000 > > isp0: scdma @ 0xf6b9000/0x1000 > > isp0: IN mbox 0 = 0x0000 > > isp0: RISC2HOST ISR 0x0 > > isp0: RISC2HOST ISR 0x40008001 > > isp0: OUT mbox 0 = 0x4000 > > isp0: IN mbox 0 = 0x0006 > > isp0: IN mbox 1 = 0xdead > > > > The workaround is to enable the firmware flash by setting > > "fwload_disable=NO", but that doesn't serves my purpose. > > > > Is there a way to avoid the issue without a firmware flash on every > reboot ? > > Moreover i have seen the issue on older firmware 5.5.0 also, as soon I > > disable the firmware flash and reboot. > > If I recall correctly, the firmware that is loaded on boot is loaded into > RAM on the card, not flashed. I don't think it affects what is actually > flashed onto the board. When I disable the firmware download by setting "fwload_disable=YES" and reboot, still most of the times it works. So i think its the eprom getting overwritten on every reboot. > So that really is what you want to do. > I disabled ISP, compiled the kernel with Qlogic driver and loaded its firmware. Since the Qlogic driver is not compatible with our CTL module, I need to go back to the old ISP driver. So I reverted my kernel and suppressed further firmware downloads by "fwload_disable=YES" and tried out. Having new firmware with old ISP driver is creating issues (mailbox timeouts) > > Also, just FYI, in past testing with 4Gb Qlogic boards I was limited to > 256MB/sec in each direction when I tried them out. I haven't seen the same > limitation with the 8Gb boards. > > It has been a few years since I tried out target mode with a 4Gb board, but > keep an eye out for that once you get it running. > > Ken > -- > Kenneth Merry > ken@FreeBSD.ORG > -- Bharat Singh Member Technical Staff, NetApp From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 07:05:56 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5379745 for ; Wed, 23 Jul 2014 07:05:56 +0000 (UTC) Received: from exprod7og109.obsmtp.com (exprod7og109.obsmtp.com [64.18.2.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2671D2884 for ; Wed, 23 Jul 2014 07:05:55 +0000 (UTC) Received: from mail-qa0-f43.google.com ([209.85.216.43]) (using TLSv1) by exprod7ob109.postini.com ([64.18.6.12]) with SMTP ID DSNKU89ezZjKz+VcLD7gG5R60BUBUHPJDr3c@postini.com; Wed, 23 Jul 2014 00:05:56 PDT Received: by mail-qa0-f43.google.com with SMTP id w8so840706qac.16 for ; Wed, 23 Jul 2014 00:05:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type; bh=mQpY1uPLhXKvyIqAr12RRiuB8XODcrgq4cn0vF7nAt0=; b=gb+noPUNUCNJVTgrqdKFPeyCKGJ8BtyGtKNDb0YTWyIq9TbgcuiV1OHgYo4ej/7vBI SU6VZW+PQD7tBdugi34FqpGocCvdXiyAI9K8WU6qHbTxXEkehPwYce5HM9zFEoE7SK07 rRzAwivg18e+C/bLaaZe6ejTuGtnv+dZUJh0l5DWL6++sZykrxw0jjEmRWVPnEEcNfau NI2vLWEmBOpRB1+E0yx+ollsZEsTqAUQ+NMWFK4BVYlCGXlh51DiRmDTeX8gM1Qr+dbN m+ckGPDDk693M4dj7J6glGnBrNZMK94taFnGB0tsFopJfimSRGlWuzIRNEPgD6s+TLaL 9DvQ== X-Gm-Message-State: ALoCoQn+I7Dr3b+uJXzpbXREDwAehc59MF6uwlxPgyvitbTr78C+4EknsQxXX1neh7YvfEaCKSafRZSg9s26sb8Ai2kwpGZLq6OYJVF8apbau7TSNRYWPSqVHPVR4UnAO2D95ESX3G5I+vAipH5NvE8sTxDIA+jv4g== X-Received: by 10.224.119.198 with SMTP id a6mr67236273qar.39.1406099148671; Wed, 23 Jul 2014 00:05:48 -0700 (PDT) X-Received: by 10.224.119.198 with SMTP id a6mr67236250qar.39.1406099148506; Wed, 23 Jul 2014 00:05:48 -0700 (PDT) From: Sumit Saxena References: <559aba5a124ee1e32ddffb1380399e28@mail.gmail.com> <20140624130840.GK1560@funkthat.com> <6f92e2e229eaea86429826ce5085e495@mail.gmail.com> <20140710092108.GU45513@funkthat.com> c0e8d27445599f47adb6df0eb5465882@mail.gmail.com <0c7840168feaf80c91d4e9067d916998@mail.gmail.com> In-Reply-To: <0c7840168feaf80c91d4e9067d916998@mail.gmail.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHrqZ/meEJEiDrDuvx3ccVdJK+lWgGJHJxVAm5QnooB5ICeqgK1uMXUmzCn14A= Date: Wed, 23 Jul 2014 12:35:46 +0530 Message-ID: Subject: RE: Kernel panic: message secondary GPT header is not in the last LBA To: John-Mark Gurney Content-Type: multipart/mixed; boundary=001a11c2e6e0447a7004fed6f857 Cc: freebsd-scsi@freebsd.org, Kashyap Desai X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 07:05:56 -0000 --001a11c2e6e0447a7004fed6f857 Content-Type: text/plain; charset=UTF-8 >-----Original Message----- >From: Sumit Saxena [mailto:sumit.saxena@avagotech.com] >Sent: Wednesday, July 16, 2014 6:03 PM >To: John-Mark Gurney >Cc: Kashyap Desai >Subject: RE: Kernel panic: message secondary GPT header is not in the last >LBA > >>-----Original Message----- >>From: Sumit Saxena [mailto:sumit.saxena@avagotech.com] >>Sent: Monday, July 14, 2014 5:28 PM >>To: 'John-Mark Gurney' >>Subject: RE: Kernel panic: message secondary GPT header is not in the >last LBA >> >> >> >> >> >>>-----Original Message----- >>>From: John-Mark Gurney [mailto:jmg@funkthat.com] >>>Sent: Thursday, July 10, 2014 2:51 PM >>>To: Sumit Saxena >>>Cc: freebsd-scsi@freebsd.org; Kashyap Desai >>>Subject: Re: Kernel panic: message secondary GPT header is not in the >>>last LBA >>> >>>Sumit Saxena wrote this message on Wed, Jul 09, 2014 at 16:09 +0530: >>>> >-----Original Message----- >>>> >From: John-Mark Gurney [mailto:jmg@funkthat.com] >>>> >Sent: Tuesday, June 24, 2014 6:39 PM >>>> >To: Sumit Saxena >>>> >Cc: freebsd-scsi@freebsd.org; Kashyap Desai >>>> >Subject: Re: Kernel panic: message secondary GPT header is not in >>>> >the >>>> last >>>> >LBA >>>> > >>>> >Sumit Saxena wrote this message on Tue, Jun 24, 2014 at 18:27 +0530: >>>> >> Hi All, >>>> >> >>>> >> >>>> >> >>>> >> While doing some testing on driver, I am facing kernel >>>> >> panic inside GEOM module. I am using FreeBSD10.0 64bit, installed >>>> >> on Virtual drive connected behind LSI MegaRAID SAS 9361 >>>> >> controller and two >>>> >> Enclosures- Dell MD1220 with total 39 drives are connected to the >>>> >> controller. As I convert unconfigured drives(connected to >>>> >> Enclosures) to JBOD(plain drive without any RAID configuration >>>> >> exposed to OS), kernel panic is observed inside GEOM module with >>>> >> below traces- >>>> >> >>>> >> >>>> >> >>>> >> =================================================== >>>> >> >>>> >> ses1: phy 0: protocols: Initiator( None ) Target( SSP ) >>>> >> >>>> >> ses1: phy 0: parent 50080e5223c0f03f addr 5000c5001afebe51 >>>> >> >>>> >> ses1: pass30,da26: Element descriptor: 'SLOT 20 ' >>>> >> >>>> >> ses1: pass30,da26: SAS Device Slot Element: 1 Phys at Slot 20, >>>> >> Not All Phys >>>> >> >>>> >> ses1: phy 0: SAS device type 1 id 0 >>>> >> >>>> >> ses1: phy 0: protocols: Initiator( None ) Target( SSP ) >>>> >> >>>> >> ses1: phy 0: parent 50080e5223c0f03f addr 5000c5004cf152f1 >>>> >> >>>> >> ses1: pass37,da33: Element descriptor: 'SLOT 21 ' >>>> >> >>>> >> ses1: pass37,da33: SAS Device Slot Element: 1 Phys at Slot 21, >>>> >> Not All Phys >>>> >> >>>> >> ses1: phy 0: SAS device type 1 id 0 >>>> >> >>>> >> ses1: phy 0: protocols: Initiator( None ) Target( SSP ) >>>> >> >>>> >> ses1: phy 0: parent 50080e5223c0f03f addr 5000c5001afd3659 >>>> >> >>>> >> ses1: pass21,da17: Element descriptor: 'SLOT 22 ' >>>> >> >>>> >> ses1: pass21,da17: SAS Device Slot Element: 1 Phys at Slot 22, >>>> >> Not All Phys >>>> >> >>>> >> ses1: phy 0: SAS device type 1 id 0 >>>> >> >>>> >> ses1: phy 0: protocols: Initiator( None ) Target( SSP ) >>>> >> >>>> >> ses1: phy 0: parent 50080e5223c0f03f addr 5000cca00baf22c1 >>>> >> >>>> >> GEOM: da12: the secondary GPT header is not in the last LBA. >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> Fatal trap 18: integer divide fault while in kernel mode >>>> >> >>>> >> cpuid = 4; apic id = 10 >>>> >> >>>> >> instruction pointer = 0x20:0xffffffff80805045 >>>> >> >>>> >> stack pointer = 0x28:0xfffffe0c23ded9e0 >>>> >> >>>> >> frame pointer = 0x28:0xfffffe0c23deda30 >>>> >> >>>> >> code segment = base 0x0, limit 0xfffff, type 0x1b >>>> >> >>>> >> = DPL 0, pres 1, >>>> >> long 1, >>>> >> def32 0, gran 1 >>>> >> >>>> >> processor eflags = interrupt enabled, resume, IOPL = >0 >>>> >> >>>> >> current process = 13 (g_event) >>>> >> >>>> >> trap number = 18 >>>> >> >>>> >> panic: integer divide fault >>>> >> >>>> >> cpuid = 4 >>>> >> >>>> >> KDB: stack backtrace: >>>> >> >>>> >> #0 0xffffffff808cb220 at kdb_backtrace+0x60 >>>> >> >>>> >> #1 0xffffffff80892d05 at panic+0x155 >>>> >> >>>> >> #2 0xffffffff80c71ae2 at trap_fatal+0x3a2 >>>> >> >>>> >> #3 0xffffffff80c7171f at trap+0x7bf >>>> >> >>>> >> #4 0xffffffff80c587e2 at calltrap+0x8 >>>> >> >>>> >> #5 0xffffffff80803574 at g_label_taste+0x3a4 >>>> >> >>>> >> #6 0xffffffff80802106 at g_new_provider_event+0xb6 >>>> >> >>>> >> #7 0xffffffff807fe1d6 at g_run_events+0x166 >>>> >> >>>> >> #8 0xffffffff80864dda at fork_exit+0x9a >>>> >> >>>> >> #9 0xffffffff80c58d1e at fork_trampoline+0xe >>>> >> >>>> >> Uptime: 4m48s >>>> >> >>>> >> kernel trap 12 with interrupts disabled >>>> > >>>> >Can you run w/ DDB enabled and get a dump? >>>> > >>>> >an integer divide makes me think of a divide by zero error... Are >>>> >you >>>> sure >>>> >things like sector size are set properly? >>>> >>>> Sorry for delay in response, sector size and other disk parameters >>>> are set properly(verified by "diskinfo"), same set of drives works >well on >>linux. >>>> We are not able to collect dump, enabled DDB but dump Is not getting >>>> collected. Partial dump is getting copied sometimes[seen message on >>>> console while dumping]. >>> >>>Can you run: >>>addr2line -e /boot/kernel/kernel.symbols 0xffffffff80803574 >>> >>>This should give us the line number that the panic is happening on, >>>and help debug it.. >>> >>>Also, is this FreeBSD 10.0-R? or is there a patch level associated w/ >>>it? Easiest way to figure out is to include uname -a in the email so >>>we know exactly what kernel source you are using.. > >I am using releases FreeBSD 10.0, no patch on top of that. >> >>Thanks for your help. I am able to capture vmcore on kenel panic, but >can't >>share that over overmail(size is 386MB) and does not have any common >>location to share vmcore with you. >>Do you have any common location, where I can share vmcore. Meanwhile I >>will also do some debugging from my end also. Any pointers from you for >>debugging the vmcore will be highly appreciated, as I am keen to learn >>FreebSD kernel debugging techniques. >> I have attached core.txt for your reference. > >I have observed that the issue hits, if there are some drives with GPT >partition >are attached to the controller. Has anyone observed the same issue, when there are drives present in the setup with GPT partitions? > >> >>> >>>Thanks. >>> >>>-- >>> John-Mark Gurney Voice: +1 415 225 5579 >>> >>> "All that I will do, has been done, All that I have, has not." --001a11c2e6e0447a7004fed6f857 Content-Type: application/octet-stream; name="core.txt.0" Content-Disposition: attachment; filename="core.txt.0" Content-Transfer-Encoding: base64 X-Attachment-Id: 815f8a69d19fdaaa_0.1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= --001a11c2e6e0447a7004fed6f857-- From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 14:09:29 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EE542ED; Wed, 23 Jul 2014 14:09:29 +0000 (UTC) Received: from mail-vc0-x235.google.com (mail-vc0-x235.google.com [IPv6:2607:f8b0:400c:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05CB62ED0; Wed, 23 Jul 2014 14:09:28 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id lf12so2223294vcb.26 for ; Wed, 23 Jul 2014 07:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=hu39cMChUiv2LWFh/JDg8A9fvBkladnpvwqe4PERpAM=; b=c1sXSQUa0xltg8LVggIUklkWADEUj1MXoHCBxrkV0UuUXR7k5OmueMevyrV9lStpO4 DzJi9f7DjPlmXawKY1AKuHeOXEmhCbIb8pkgkD26t7P1XwLEjZTcqwGuHSrzHESic9uJ XscODlFvEaRsyK2MIbp5VjTcogsKaASbFw4NcPri4csNzVcJTa+O0cQfT9ucjv/PdX9c ksSFSfOjaw0ijDcsFp6uDuUDJBHjq47680/FoDXv7CrPuU/ALfMPKA3ydEVFlIZAJZD6 hl2vC4622X4zRscpH1hsbVi6HrjlHrhG6I79iSYdu/F31E2X54Xf9s4K8Gdh44XWF4u5 Zcvg== X-Received: by 10.52.154.106 with SMTP id vn10mr1978945vdb.36.1406124567928; Wed, 23 Jul 2014 07:09:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.156.71 with HTTP; Wed, 23 Jul 2014 07:09:07 -0700 (PDT) In-Reply-To: References: <20140723042258.GA15089@nargothrond.kdm.org> From: bharat singh Date: Wed, 23 Jul 2014 19:39:07 +0530 Message-ID: Subject: Re: QLogic 24xx FC HBAs not working fine with CAM Target Layer To: "Kenneth D. Merry" , Matthew Jacob Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: freebsd-scsi@freebsd.org, freebsd-drivers@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 14:09:29 -0000 Some more info 8G HBA also showing same issues. Once firmware issue is resolved I am able to run I/O without any issue. Is it necessary to enable firmware download on every reboot. If I am suppressing the firmware download by setting the "fwload_disable=YES" it's causing the issue inconsistently. On Wed, Jul 23, 2014 at 12:33 PM, bharat singh wrote: > On Wed, Jul 23, 2014 at 9:52 AM, Kenneth D. Merry wrote: > >> On Tue, Jul 22, 2014 at 13:06:53 +0530, bharat singh wrote: >> > Hello, >> > >> > I am trying to use a new firmware on a single port FC HBA with freebsd9 >> > stable, but facing the firmware issue. >> > >> > Card came with firmware version 5.5.0 >> > (isp0: Board Type 2422, Chip Revision 0x3, resident F/W Revision 5.5.0) >> > >> > I upgraded the firmware to 5.6.5, and disabled firmware flag by setting >> > "fwload_disable=YES" flag in /boot/device.hints to retain the newer >> > firmware. >> > On subsequent reboots the firmware fails to initialize and throws >> > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) >> >> In general, you want to load the ispfw module or compile it into your >> kernel. The driver was tested with the firmware included in the module, >> and may not work as well (or at all) with a different version. >> >> If you know what changed between the firmware version compiled into the >> ispfw module and the one you want to run, you can make any necessary >> driver >> modifications. >> >> > [root@Ctrl4 ~]# ctladm port -l >> > Port Online Type Name pp vp WWNN WWPN >> > Speed Vendor >> > 0 YES IOCTL CTL ioctl 0 0 0 0 >> > 0 >> > 1 YES INTERNAL ctl2cam 0 0 0x5000000edac0c700 >> > 0x5000000edac0c702 0 >> > 2 YES INTERNAL CTL internal 0 0 0 0 >> > 0 >> > >> > * It's not showing FC port >> >> You need to compile your kernel with: >> >> options ISP_TARGET_MODE=1 >> >> Otherwise you won't get target mode functionality in the isp(4) driver. >> > Yes, ISP is enabled for target functionality. > >> >> > 1448 Jul 22 11:05:37 Ctrl4 kernel: isp0: IN mbox 0 = 0x0008 >> > 1450 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 >> > 1451 Jul 22 11:05:37 Ctrl4 last message repeated 999 times >> > 1454 Jul 22 11:05:37 Ctrl4 kernel: isp0: Polled Mailbox Command (0x8) >> > Timeout (100000us) (started @ isp_reset:1045) >> > 1456 Jul 22 11:05:37 Ctrl4 kernel: isp0: Mailbox Command 'ABOUT >> FIRMWARE' >> > failed (TIMEOUT) >> > 1458 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 >> > 1460 Jul 22 11:05:37 Ctrl4 kernel: Trying to mount root from >> > ufs:/dev/label/root_0 [rw]... >> > 1462 Jul 22 11:05:37 Ctrl4 kernel: device_attach: isp0 attach returned 6 >> > 1464 Jul 22 11:05:37 Ctrl4 kernel: isp0: > > Adapter> port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at device >> 0.0 >> > on pci 3 >> > 1465 Jul 22 11:05:37 Ctrl4 kernel: isp0: loaded firmware isp_2400_multi >> > >> > from dmesg: >> > isp0: RISC2HOST ISR 0x40000101 >> > isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ >> > isp_reset:1045) >> > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) >> > isp0: RISC2HOST ISR 0x40000101 >> > device_attach: isp0 attach returned 6 >> > isp0: port 0x3000-0x30ff mem >> > 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci3 >> > isp0: loaded firmware isp_2400_multi >> > isp0: set PCI latency to 64 >> > isp0: request/result area @ 0xf700000/0x38000 >> > isp0: scdma @ 0xf6b9000/0x1000 >> > isp0: IN mbox 0 = 0x0000 >> > isp0: RISC2HOST ISR 0x0 >> > isp0: RISC2HOST ISR 0x40008001 >> > isp0: OUT mbox 0 = 0x4000 >> > isp0: IN mbox 0 = 0x0006 >> > isp0: IN mbox 1 = 0xdead >> > >> > The workaround is to enable the firmware flash by setting >> > "fwload_disable=NO", but that doesn't serves my purpose. >> > >> > Is there a way to avoid the issue without a firmware flash on every >> reboot ? >> > Moreover i have seen the issue on older firmware 5.5.0 also, as soon I >> > disable the firmware flash and reboot. >> >> If I recall correctly, the firmware that is loaded on boot is loaded into >> RAM on the card, not flashed. I don't think it affects what is actually >> flashed onto the board. > > When I disable the firmware download by setting "fwload_disable=YES" and > reboot, still most of the times it works. So i think its the eprom getting > overwritten on every reboot. > > >> > So that really is what you want to do. >> > > I disabled ISP, compiled the kernel with Qlogic driver and loaded its > firmware. Since the Qlogic driver is not compatible with our CTL module, I > need to go back to the old ISP driver. So I reverted my kernel and > suppressed further firmware downloads by "fwload_disable=YES" and tried > out. Having new firmware with old ISP driver is creating issues (mailbox > timeouts) > >> >> Also, just FYI, in past testing with 4Gb Qlogic boards I was limited to >> 256MB/sec in each direction when I tried them out. I haven't seen the >> same >> limitation with the 8Gb boards. >> >> It has been a few years since I tried out target mode with a 4Gb board, >> but >> keep an eye out for that once you get it running. >> >> Ken >> -- >> Kenneth Merry >> ken@FreeBSD.ORG >> > > > > -- > Bharat Singh > Member Technical Staff, NetApp > > > > -- Bharat Singh Member Technical Staff, NetApp From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 16:49:25 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5074C25; Wed, 23 Jul 2014 16:49:25 +0000 (UTC) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6823F2134; Wed, 23 Jul 2014 16:49:25 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.9/8.14.2) with ESMTP id s6NGnNpI020226; Wed, 23 Jul 2014 10:49:23 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.9/8.14.9/Submit) id s6NGnNfp020225; Wed, 23 Jul 2014 10:49:23 -0600 (MDT) (envelope-from ken) Date: Wed, 23 Jul 2014 10:49:23 -0600 From: "Kenneth D. Merry" To: bharat singh Subject: Re: QLogic 24xx FC HBAs not working fine with CAM Target Layer Message-ID: <20140723164923.GA19987@nargothrond.kdm.org> References: <20140723042258.GA15089@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-scsi@freebsd.org, mjacob@freebsd.org, davidcs@freebsd.org, freebsd-drivers@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 16:49:26 -0000 On Wed, Jul 23, 2014 at 12:33:16 +0530, bharat singh wrote: > On Wed, Jul 23, 2014 at 9:52 AM, Kenneth D. Merry wrote: > > > On Tue, Jul 22, 2014 at 13:06:53 +0530, bharat singh wrote: > > > Hello, > > > > > > I am trying to use a new firmware on a single port FC HBA with freebsd9 > > > stable, but facing the firmware issue. > > > > > > Card came with firmware version 5.5.0 > > > (isp0: Board Type 2422, Chip Revision 0x3, resident F/W Revision 5.5.0) > > > > > > I upgraded the firmware to 5.6.5, and disabled firmware flag by setting > > > "fwload_disable=YES" flag in /boot/device.hints to retain the newer > > > firmware. > > > On subsequent reboots the firmware fails to initialize and throws > > > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > > > > In general, you want to load the ispfw module or compile it into your > > kernel. The driver was tested with the firmware included in the module, > > and may not work as well (or at all) with a different version. > > > > If you know what changed between the firmware version compiled into the > > ispfw module and the one you want to run, you can make any necessary driver > > modifications. > > > > > [root@Ctrl4 ~]# ctladm port -l > > > Port Online Type Name pp vp WWNN WWPN > > > Speed Vendor > > > 0 YES IOCTL CTL ioctl 0 0 0 0 > > > 0 > > > 1 YES INTERNAL ctl2cam 0 0 0x5000000edac0c700 > > > 0x5000000edac0c702 0 > > > 2 YES INTERNAL CTL internal 0 0 0 0 > > > 0 > > > > > > * It's not showing FC port > > > > You need to compile your kernel with: > > > > options ISP_TARGET_MODE=1 > > > > Otherwise you won't get target mode functionality in the isp(4) driver. > > > Yes, ISP is enabled for target functionality. In order for CTL to recognize that an HBA is target-capable, the driver has to set the PIT_PROCESSOR bit (at least) in the target_sprt field in the XPT_PATH_INQ CCB. If you don't see the driver listed in the CTL port display, that means that the driver likely isn't reporting itself to be target-capable. See the code in isp_freebsd.c that fills in the XPT_PATH_INQ CCB. > > > 1448 Jul 22 11:05:37 Ctrl4 kernel: isp0: IN mbox 0 = 0x0008 > > > 1450 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > > > 1451 Jul 22 11:05:37 Ctrl4 last message repeated 999 times > > > 1454 Jul 22 11:05:37 Ctrl4 kernel: isp0: Polled Mailbox Command (0x8) > > > Timeout (100000us) (started @ isp_reset:1045) > > > 1456 Jul 22 11:05:37 Ctrl4 kernel: isp0: Mailbox Command 'ABOUT FIRMWARE' > > > failed (TIMEOUT) > > > 1458 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > > > 1460 Jul 22 11:05:37 Ctrl4 kernel: Trying to mount root from > > > ufs:/dev/label/root_0 [rw]... > > > 1462 Jul 22 11:05:37 Ctrl4 kernel: device_attach: isp0 attach returned 6 > > > 1464 Jul 22 11:05:37 Ctrl4 kernel: isp0: > > Adapter> port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at device > > 0.0 > > > on pci 3 > > > 1465 Jul 22 11:05:37 Ctrl4 kernel: isp0: loaded firmware isp_2400_multi > > > > > > from dmesg: > > > isp0: RISC2HOST ISR 0x40000101 > > > isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ > > > isp_reset:1045) > > > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > > > isp0: RISC2HOST ISR 0x40000101 > > > device_attach: isp0 attach returned 6 > > > isp0: port 0x3000-0x30ff mem > > > 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci3 > > > isp0: loaded firmware isp_2400_multi > > > isp0: set PCI latency to 64 > > > isp0: request/result area @ 0xf700000/0x38000 > > > isp0: scdma @ 0xf6b9000/0x1000 > > > isp0: IN mbox 0 = 0x0000 > > > isp0: RISC2HOST ISR 0x0 > > > isp0: RISC2HOST ISR 0x40008001 > > > isp0: OUT mbox 0 = 0x4000 > > > isp0: IN mbox 0 = 0x0006 > > > isp0: IN mbox 1 = 0xdead > > > > > > The workaround is to enable the firmware flash by setting > > > "fwload_disable=NO", but that doesn't serves my purpose. > > > > > > Is there a way to avoid the issue without a firmware flash on every > > reboot ? > > > Moreover i have seen the issue on older firmware 5.5.0 also, as soon I > > > disable the firmware flash and reboot. > > > > If I recall correctly, the firmware that is loaded on boot is loaded into > > RAM on the card, not flashed. I don't think it affects what is actually > > flashed onto the board. > > When I disable the firmware download by setting "fwload_disable=YES" and > reboot, still most of the times it works. So i think its the eprom getting > overwritten on every reboot. Take a look at isp_reset() in isp.c. It downloads firmware into RAM on the card, and then tells the card to execute it. It isn't re-flashing the card. If that were the case, you would have to use a tool to flash new firmware to get back to the newer version of firmware. Instead, you just tell the driver not to download firmware and it uses the firmware that's flashed into the card. > > > So that really is what you want to do. > > > > I disabled ISP, compiled the kernel with Qlogic driver and loaded its > firmware. Since the Qlogic driver is not compatible with our CTL module, I > need to go back to the old ISP driver. So I reverted my kernel and > suppressed further firmware downloads by "fwload_disable=YES" and tried > out. Having new firmware with old ISP driver is creating issues (mailbox > timeouts) Which Qlogic driver are you using? If it isn't compatible with CTL, then it will likely take some work to add the ability to interface with CTL. > > > > Also, just FYI, in past testing with 4Gb Qlogic boards I was limited to > > 256MB/sec in each direction when I tried them out. I haven't seen the same > > limitation with the 8Gb boards. > > > > It has been a few years since I tried out target mode with a 4Gb board, but > > keep an eye out for that once you get it running. > > > > Ken > > -- > > Kenneth Merry > > ken@FreeBSD.ORG > > > > > > -- > Bharat Singh > Member Technical Staff, NetApp Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 16:51:49 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D87F6EAA; Wed, 23 Jul 2014 16:51:49 +0000 (UTC) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6895921D0; Wed, 23 Jul 2014 16:51:48 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.9/8.14.2) with ESMTP id s6NGpmIY020272; Wed, 23 Jul 2014 10:51:48 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.9/8.14.9/Submit) id s6NGpm4S020271; Wed, 23 Jul 2014 10:51:48 -0600 (MDT) (envelope-from ken) Date: Wed, 23 Jul 2014 10:51:48 -0600 From: "Kenneth D. Merry" To: bharat singh Subject: Re: QLogic 24xx FC HBAs not working fine with CAM Target Layer Message-ID: <20140723165147.GB19987@nargothrond.kdm.org> References: <20140723042258.GA15089@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-scsi@freebsd.org, Matthew Jacob , davidcs@freebsd.org, freebsd-drivers@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 16:51:49 -0000 On Wed, Jul 23, 2014 at 19:39:07 +0530, bharat singh wrote: > Some more info > > 8G HBA also showing same issues. Once firmware issue is resolved I am able > to run I/O without any issue. > Is it necessary to enable firmware download on every reboot. Yes. The isp(4) driver at least is somewhat tied to a given firmware revision. If you update the firmware, you have to take into account the changes that occured in the intervening firmware releases. > If I am suppressing the firmware download by setting the > "fwload_disable=YES" it's causing the issue inconsistently. That isn't surprising. I would suggest either running with the firmware bundled with the driver, or update the driver to account for the changes in the firmware. (In that case, you'll want to bundle the new firmware with the driver, so you don't have to flash every card on every machine you have with the new firmware.) Ken > > On Wed, Jul 23, 2014 at 12:33 PM, bharat singh > wrote: > > > On Wed, Jul 23, 2014 at 9:52 AM, Kenneth D. Merry wrote: > > > >> On Tue, Jul 22, 2014 at 13:06:53 +0530, bharat singh wrote: > >> > Hello, > >> > > >> > I am trying to use a new firmware on a single port FC HBA with freebsd9 > >> > stable, but facing the firmware issue. > >> > > >> > Card came with firmware version 5.5.0 > >> > (isp0: Board Type 2422, Chip Revision 0x3, resident F/W Revision 5.5.0) > >> > > >> > I upgraded the firmware to 5.6.5, and disabled firmware flag by setting > >> > "fwload_disable=YES" flag in /boot/device.hints to retain the newer > >> > firmware. > >> > On subsequent reboots the firmware fails to initialize and throws > >> > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > >> > >> In general, you want to load the ispfw module or compile it into your > >> kernel. The driver was tested with the firmware included in the module, > >> and may not work as well (or at all) with a different version. > >> > >> If you know what changed between the firmware version compiled into the > >> ispfw module and the one you want to run, you can make any necessary > >> driver > >> modifications. > >> > >> > [root@Ctrl4 ~]# ctladm port -l > >> > Port Online Type Name pp vp WWNN WWPN > >> > Speed Vendor > >> > 0 YES IOCTL CTL ioctl 0 0 0 0 > >> > 0 > >> > 1 YES INTERNAL ctl2cam 0 0 0x5000000edac0c700 > >> > 0x5000000edac0c702 0 > >> > 2 YES INTERNAL CTL internal 0 0 0 0 > >> > 0 > >> > > >> > * It's not showing FC port > >> > >> You need to compile your kernel with: > >> > >> options ISP_TARGET_MODE=1 > >> > >> Otherwise you won't get target mode functionality in the isp(4) driver. > >> > > Yes, ISP is enabled for target functionality. > > > >> > >> > 1448 Jul 22 11:05:37 Ctrl4 kernel: isp0: IN mbox 0 = 0x0008 > >> > 1450 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > >> > 1451 Jul 22 11:05:37 Ctrl4 last message repeated 999 times > >> > 1454 Jul 22 11:05:37 Ctrl4 kernel: isp0: Polled Mailbox Command (0x8) > >> > Timeout (100000us) (started @ isp_reset:1045) > >> > 1456 Jul 22 11:05:37 Ctrl4 kernel: isp0: Mailbox Command 'ABOUT > >> FIRMWARE' > >> > failed (TIMEOUT) > >> > 1458 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > >> > 1460 Jul 22 11:05:37 Ctrl4 kernel: Trying to mount root from > >> > ufs:/dev/label/root_0 [rw]... > >> > 1462 Jul 22 11:05:37 Ctrl4 kernel: device_attach: isp0 attach returned 6 > >> > 1464 Jul 22 11:05:37 Ctrl4 kernel: isp0: >> > Adapter> port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at device > >> 0.0 > >> > on pci 3 > >> > 1465 Jul 22 11:05:37 Ctrl4 kernel: isp0: loaded firmware isp_2400_multi > >> > > >> > from dmesg: > >> > isp0: RISC2HOST ISR 0x40000101 > >> > isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ > >> > isp_reset:1045) > >> > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > >> > isp0: RISC2HOST ISR 0x40000101 > >> > device_attach: isp0 attach returned 6 > >> > isp0: port 0x3000-0x30ff mem > >> > 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci3 > >> > isp0: loaded firmware isp_2400_multi > >> > isp0: set PCI latency to 64 > >> > isp0: request/result area @ 0xf700000/0x38000 > >> > isp0: scdma @ 0xf6b9000/0x1000 > >> > isp0: IN mbox 0 = 0x0000 > >> > isp0: RISC2HOST ISR 0x0 > >> > isp0: RISC2HOST ISR 0x40008001 > >> > isp0: OUT mbox 0 = 0x4000 > >> > isp0: IN mbox 0 = 0x0006 > >> > isp0: IN mbox 1 = 0xdead > >> > > >> > The workaround is to enable the firmware flash by setting > >> > "fwload_disable=NO", but that doesn't serves my purpose. > >> > > >> > Is there a way to avoid the issue without a firmware flash on every > >> reboot ? > >> > Moreover i have seen the issue on older firmware 5.5.0 also, as soon I > >> > disable the firmware flash and reboot. > >> > >> If I recall correctly, the firmware that is loaded on boot is loaded into > >> RAM on the card, not flashed. I don't think it affects what is actually > >> flashed onto the board. > > > > When I disable the firmware download by setting "fwload_disable=YES" and > > reboot, still most of the times it works. So i think its the eprom getting > > overwritten on every reboot. > > > > > >> > > So that really is what you want to do. > >> > > > > I disabled ISP, compiled the kernel with Qlogic driver and loaded its > > firmware. Since the Qlogic driver is not compatible with our CTL module, I > > need to go back to the old ISP driver. So I reverted my kernel and > > suppressed further firmware downloads by "fwload_disable=YES" and tried > > out. Having new firmware with old ISP driver is creating issues (mailbox > > timeouts) > > > >> > >> Also, just FYI, in past testing with 4Gb Qlogic boards I was limited to > >> 256MB/sec in each direction when I tried them out. I haven't seen the > >> same > >> limitation with the 8Gb boards. > >> > >> It has been a few years since I tried out target mode with a 4Gb board, > >> but > >> keep an eye out for that once you get it running. > >> > >> Ken > >> -- > >> Kenneth Merry > >> ken@FreeBSD.ORG > >> > > > > > > > > -- > > Bharat Singh > > Member Technical Staff, NetApp > > > > > > > > > > > -- > Bharat Singh > Member Technical Staff, NetApp -- Kenneth Merry ken@FreeBSD.ORG From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 23 17:39:31 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D4B34AC; Wed, 23 Jul 2014 17:39:31 +0000 (UTC) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C86226ED; Wed, 23 Jul 2014 17:39:30 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id la4so2783061vcb.5 for ; Wed, 23 Jul 2014 10:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=QPs7SMJceTuajMdJmjugg7p1QbiER72Ers3S0R8r5tE=; b=EopMe264P6euZZ68EOdd+umvNuuSL3Ds47NdcjmyYmAAihzD7jBOWEDlWIVe4gbRK1 ak87csvR2MMUAVydIVit901Fasd5KJDa37urG6BaQ1N6Oo8e0Ng7Bp2cBARJ1w6CK7A6 fO451iFh3aamz372Agbqj/Gx8upDYuD2gDcoVo1d9LvC7rQD9GcnZVDyXpdOp+5pg0H+ gSHXYSbqZCM8v+b3baKPsMDu7p4yD+t6iU+AMQhmMMMB+nxys9qntYYbrgAeU/itHxke A2XMP6pORmiDxcKYM60ptmZGp6B7NqQzjXeAinmDNST+plnT1m/c1hayf1qIHae+Wley lROQ== X-Received: by 10.221.69.8 with SMTP id ya8mr4273262vcb.39.1406137167601; Wed, 23 Jul 2014 10:39:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.156.71 with HTTP; Wed, 23 Jul 2014 10:39:07 -0700 (PDT) In-Reply-To: <20140723164923.GA19987@nargothrond.kdm.org> References: <20140723042258.GA15089@nargothrond.kdm.org> <20140723164923.GA19987@nargothrond.kdm.org> From: bharat singh Date: Wed, 23 Jul 2014 23:09:07 +0530 Message-ID: Subject: Re: QLogic 24xx FC HBAs not working fine with CAM Target Layer To: "Kenneth D. Merry" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: freebsd-scsi@freebsd.org, Matthew Jacob , davidcs@freebsd.org, freebsd-drivers@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 17:39:31 -0000 On Wed, Jul 23, 2014 at 10:19 PM, Kenneth D. Merry wrote: > On Wed, Jul 23, 2014 at 12:33:16 +0530, bharat singh wrote: > > On Wed, Jul 23, 2014 at 9:52 AM, Kenneth D. Merry > wrote: > > > > > On Tue, Jul 22, 2014 at 13:06:53 +0530, bharat singh wrote: > > > > Hello, > > > > > > > > I am trying to use a new firmware on a single port FC HBA with > freebsd9 > > > > stable, but facing the firmware issue. > > > > > > > > Card came with firmware version 5.5.0 > > > > (isp0: Board Type 2422, Chip Revision 0x3, resident F/W Revision > 5.5.0) > > > > > > > > I upgraded the firmware to 5.6.5, and disabled firmware flag by > setting > > > > "fwload_disable=3DYES" flag in /boot/device.hints to retain the new= er > > > > firmware. > > > > On subsequent reboots the firmware fails to initialize and throws > > > > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > > > > > > In general, you want to load the ispfw module or compile it into your > > > kernel. The driver was tested with the firmware included in the > module, > > > and may not work as well (or at all) with a different version. > > > > > > If you know what changed between the firmware version compiled into t= he > > > ispfw module and the one you want to run, you can make any necessary > driver > > > modifications. > > > > > > > [root@Ctrl4 ~]# ctladm port -l > > > > Port Online Type Name pp vp WWNN WWPN > > > > Speed Vendor > > > > 0 YES IOCTL CTL ioctl 0 0 0 0 > > > > 0 > > > > 1 YES INTERNAL ctl2cam 0 0 0x5000000edac0c700 > > > > 0x5000000edac0c702 0 > > > > 2 YES INTERNAL CTL internal 0 0 0 0 > > > > 0 > > > > > > > > * It's not showing FC port > > > > > > You need to compile your kernel with: > > > > > > options ISP_TARGET_MODE=3D1 > > > > > > Otherwise you won't get target mode functionality in the isp(4) drive= r. > > > > > Yes, ISP is enabled for target functionality. > > In order for CTL to recognize that an HBA is target-capable, the driver h= as > to set the PIT_PROCESSOR bit (at least) in the target_sprt field in the > XPT_PATH_INQ CCB. > > If you don't see the driver listed in the CTL port display, that means th= at > the driver likely isn't reporting itself to be target-capable. > > See the code in isp_freebsd.c that fills in the XPT_PATH_INQ CCB. > > > > > 1448 Jul 22 11:05:37 Ctrl4 kernel: isp0: IN mbox 0 =3D 0x0008 > > > > 1450 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > > > > 1451 Jul 22 11:05:37 Ctrl4 last message repeated 999 times > > > > 1454 Jul 22 11:05:37 Ctrl4 kernel: isp0: Polled Mailbox Command (0x= 8) > > > > Timeout (100000us) (started @ isp_reset:1045) > > > > 1456 Jul 22 11:05:37 Ctrl4 kernel: isp0: Mailbox Command 'ABOUT > FIRMWARE' > > > > failed (TIMEOUT) > > > > 1458 Jul 22 11:05:37 Ctrl4 kernel: isp0: RISC2HOST ISR 0x40000101 > > > > 1460 Jul 22 11:05:37 Ctrl4 kernel: Trying to mount root from > > > > ufs:/dev/label/root_0 [rw]... > > > > 1462 Jul 22 11:05:37 Ctrl4 kernel: device_attach: isp0 attach > returned 6 > > > > 1464 Jul 22 11:05:37 Ctrl4 kernel: isp0: > > > Adapter> port 0x3000-0x30ff mem 0xc1040000-0xc1043fff irq 16 at > device > > > 0.0 > > > > on pci 3 > > > > 1465 Jul 22 11:05:37 Ctrl4 kernel: isp0: loaded firmware > isp_2400_multi > > > > > > > > from dmesg: > > > > isp0: RISC2HOST ISR 0x40000101 > > > > isp0: Polled Mailbox Command (0x8) Timeout (100000us) (started @ > > > > isp_reset:1045) > > > > isp0: Mailbox Command 'ABOUT FIRMWARE' failed (TIMEOUT) > > > > isp0: RISC2HOST ISR 0x40000101 > > > > device_attach: isp0 attach returned 6 > > > > isp0: port 0x3000-0x30ff mem > > > > 0xc1040000-0xc1043fff irq 16 at device 0.0 on pci3 > > > > isp0: loaded firmware isp_2400_multi > > > > isp0: set PCI latency to 64 > > > > isp0: request/result area @ 0xf700000/0x38000 > > > > isp0: scdma @ 0xf6b9000/0x1000 > > > > isp0: IN mbox 0 =3D 0x0000 > > > > isp0: RISC2HOST ISR 0x0 > > > > isp0: RISC2HOST ISR 0x40008001 > > > > isp0: OUT mbox 0 =3D 0x4000 > > > > isp0: IN mbox 0 =3D 0x0006 > > > > isp0: IN mbox 1 =3D 0xdead > > > > > > > > The workaround is to enable the firmware flash by setting > > > > "fwload_disable=3DNO", but that doesn't serves my purpose. > > > > > > > > Is there a way to avoid the issue without a firmware flash on every > > > reboot ? > > > > Moreover i have seen the issue on older firmware 5.5.0 also, as soo= n > I > > > > disable the firmware flash and reboot. > > > > > > If I recall correctly, the firmware that is loaded on boot is loaded > into > > > RAM on the card, not flashed. I don't think it affects what is > actually > > > flashed onto the board. > > > > When I disable the firmware download by setting "fwload_disable=3DYES" = and > > reboot, still most of the times it works. So i think its the eprom > getting > > overwritten on every reboot. > > Take a look at isp_reset() in isp.c. It downloads firmware into RAM on t= he > card, and then tells the card to execute it. It isn't re-flashing the > card. > > If that were the case, you would have to use a tool to flash new firmware > to get back to the newer version of firmware. Instead, you just tell the > driver not to download firmware and it uses the firmware that's flashed > into the card. > > Yes isp_reset() skips firmware download if firmware is not there or its overridden by the flag. In my setup I haven't flashed the firmware. After I load the newer firmware 5.6.5 and suppress further downloads, the new firmware exists even after reboots. Does it means that my HBA card came with 5.6.5 or the loaded firmware get persistent somewhere. > > > > So that really is what you want to do. > > > > > > > I disabled ISP, compiled the kernel with Qlogic driver and loaded its > > firmware. Since the Qlogic driver is not compatible with our CTL module= , > I > > need to go back to the old ISP driver. So I reverted my kernel and > > suppressed further firmware downloads by "fwload_disable=3DYES" and tri= ed > > out. Having new firmware with old ISP driver is creating issues (mailbo= x > > timeouts) > > Which Qlogic driver are you using? > I am trying to use a Qlogic version 5.6.5, but it doesn't integrate with the CTL of freebsd. It has all the functionality to manage the Qlogic card =E2=80=9Cmessages:May 26 17:52:33 es175 kernel: isp0: Board Type 2532, Chip Revision 0x2, resident F/W Revision 5.6.5=E2=80=9D > If it isn't compatible with CTL, then it will likely take some work to ad= d > the ability to interface with CTL. > > > > > > > Also, just FYI, in past testing with 4Gb Qlogic boards I was limited = to > > > 256MB/sec in each direction when I tried them out. I haven't seen th= e > same > > > limitation with the 8Gb boards. > > > > > > It has been a few years since I tried out target mode with a 4Gb > board, but > > > keep an eye out for that once you get it running. > > > > > > Ken > > > -- > > > Kenneth Merry > > > ken@FreeBSD.ORG > > > > > > > > > > > -- > > Bharat Singh > > Member Technical Staff, NetApp > > Ken > -- > Kenneth Merry > ken@FreeBSD.ORG > --=20 Bharat Singh Member Technical Staff, NetApp From owner-freebsd-scsi@FreeBSD.ORG Fri Jul 25 12:17:11 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AF18D8C for ; Fri, 25 Jul 2014 12:17:11 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D424A2A05 for ; Fri, 25 Jul 2014 12:17:10 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id m15so4096784wgh.3 for ; Fri, 25 Jul 2014 05:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=8m1OGoDC4jKged9L21mF9tlO2tlsRxXQuLY1QTBz92k=; b=aBwOWfVOV9Yy0zN1SuMejUvLLcP6b2lPd2h5iI41UHLvMEdO99wjGasbs6hIX5OfVg O3XIcNHY2Q2wBNFY4iPZv5m09yAJi3u02UPi/klasdcTN3MXn5gJYqhtWnStudGP7Vqc Znh7L+BarICmXOpAM+pZOxiy0m7v1A1vog5K1sxd3HsEDDexydEIzNw35U3+E6yWcoCD SWKTeHjkd/9XUNZBIKZfR0nXwtwUJ3E/dujInr7a3FxSOaNwXYA6dENOVD3nUc6KN8AE /z8bsbOWjTMXFi5gplrAXmdQh5CYDjsi7RiocotbtMezwPaq2zKbwJ63m91JsgIFT92/ PuhA== X-Received: by 10.194.90.201 with SMTP id by9mr21740478wjb.94.1406290628533; Fri, 25 Jul 2014 05:17:08 -0700 (PDT) Received: from brick.home (cmu49.neoplus.adsl.tpnet.pl. [83.31.148.49]) by mx.google.com with ESMTPSA id p3sm24835657wjw.13.2014.07.25.05.17.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jul 2014 05:17:07 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 25 Jul 2014 14:17:04 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Chen Wen Subject: Re: usr.sbin/ctld/login.c do not reply TargetPortalGroupTag in Login response Message-ID: <20140725121704.GA37342@brick.home> Mail-Followup-To: Chen Wen , freebsd-scsi@freebsd.org References: <1C0DBE89-1D7B-458C-AB91-F17D0DD9C717@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1C0DBE89-1D7B-458C-AB91-F17D0DD9C717@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 12:17:11 -0000 On 0723T1143, Chen Wen wrote: > Hi > > I am a mac user, when I try to use xtendsan iSCSI initiator to connect native iSCSI target, I found that the login response pdu do not have TargetPortalGroupTag key-pair. > > xtendsan told me TargetPortalGroupTag is missing and disconnected. > > I try to do a workaround to it and it works. [..] Interesting. Looking at the current code, I don't see how it could _not_ send the TargetPortalGroupTag. Could you test again, without the patch below, running ctld like this, and send me the complete output: pkill ctld while :; do ctld -d; done Thanks!