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