Qlogic FC scsi_target ISP2310

Alexander Sack pisymbol at gmail.com
Sat Aug 30 14:08:53 UTC 2008


On Sat, Aug 30, 2008 at 2:28 AM, Fuujin Networks LLC
<erich at fuujinnetworks.com> wrote:
> Alex:
>
> Thanks very much for the patch. Unfortunately, I ended up with a similar
> result as seen below. Just for grins, I tried the patch on a 64-bit system
> (AMD64) to see if there was a difference based on which architecture is used
> for the target. No difference there either; still dumps core and reboots.
> The upside I would think is that both branches seem to be in sync. I do have
> a sparc64 box here if you'd like to see what happens in that world (haven't
> tested it yet).

No, no, no....the patch was not to FIX the target mode issue.  There
is only one firmware and it does get loaded (even with the error
message below).  I was *JUST* trying to avoid firmware_get() to
attempt to register a firmware that does not exist.  I reversed the
patch, are you sure you applied the right one?  Take a look but
isp_pci.c should have an added IS_SCSI(isp) to line 1039 here it is
again:

--- isp_pci.c.0 2008-08-29 08:03:24.000000000 -0400
+++ isp_pci.c   2008-08-29 07:58:08.000000000 -0400
@@ -1039,7 +1039,7 @@
               }

               isp->isp_osinfo.fw = NULL;
-               if (isp->isp_role & ISP_ROLE_TARGET) {
+               if (isp->isp_role & ISP_ROLE_TARGET && IS_SCSI(isp)) {
                       snprintf(fwname, sizeof (fwname), "isp_%04x_it", did);
                       isp->isp_osinfo.fw = firmware_get(fwname);
               }

This should eliminate the firmware_get() message.  But AGAIN this will
not fix your target mode issues.

> [snip]
> (targ0:isp0:0:2:0): targdone 0xffffff0001ddda00
> (targ0:isp0:0:2:0): targread
> (targ0:isp0:0:2:0): targread ccb 0xffffff0001ddda00 (0x800b7fe20)
> (targ0:isp0:0:2:0): targreturnccb 0xffffff0001ddda00
> cam_debug: targfreeccb descr 0xffffff0001dda1c0 and
> cam_debug: freeing ccb 0xffffff0001ddda00
> (targ0:isp0:0:2:0): write - uio_resid 8
> (targ0:isp0:0:2:0): Sending queued ccb 0x933 (0x800b85040)
> (targ0:isp0:0:2:0): targstart 0xffffff0001369000
> (targ0:isp0:0:2:0): sendccb 0xffffff0001369000
>
>
> Fatal trap 12: page fault while in kernel mode
> cpuid = 0; apic id = 00
> fault virtual address   = 0x8
> fault code              = supervisor read data, page not present
> instruction pointer     = 0x8:0xffffffff8025d2e8
> stack pointer           = 0x10:0xffffffffae3d06f0
> frame pointer           = 0x10:0xffffffff80a42000
> 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         = 783 (scsi_target)
> trap number             = 12
> panic: page fault
> cpuid = 0
> Uptime: 7m21s
> Physical memory: 4021 MB
> Dumping 364 MB:: write - uio_resid 8
> (targ0:isp0:0:2:0): getccb 0xffffff0001db7c00
> (targ0:isp0:0:2:0): Sent ATIO/INOT (0x800b61a10)
> (targ0:isp0:0:2:0): write - uio_resid 8
> (targ0:isp0:0:2:0): getccb 0xffffff0001db7b00
> [snip]
>
>
> Seems to be nearly the same result in loading the firmware:
>
> [snip]
> registered firmware set <isp_1040>
> registered firmware set <isp_1040_it>
> registered firmware set <isp_1080>
> registered firmware set <isp_1080_it>
> registered firmware set <isp_12160>
> registered firmware set <isp_12160_it>
> registered firmware set <isp_2100>
> registered firmware set <isp_2200>
> registered firmware set <isp_2300>
> registered firmware set <isp_2322>
> registered firmware set <isp_2400>
> [snip]
> isp0: <Qlogic ISP 2300 PCI FC-AL Adapter> port 0x3000-0x30ff mem
> 0xfe020000-0xfe020fff irq 25 at device 1.0 on pci2
> firmware_get: failed to load firmware image isp_2300_it
> isp0: [ITHREAD]

Hold on, do you see this message with the patch?  Are you sure you
rebuild and rebooted correctly?  You should not see this message
anymore.  I will verify the patch again but see above.

> It doesn't appear that the firmware "isp_2300_it" either exists or possibly
> isn't named properly on the target machine (or the initiator for that
> matter). However, there do not seem to be any problems loading the firmware
> for the card when it's not in target mode.

No there is no problem.  The error message above is harmless.

> From everything I've read, it looks like the firmware needs to be loaded via
> the kernel device option "ispfw". If for nothing other than my
> understanding, is there some reason we're not loading the firmware resident
> on the card?

You ARE loading the firmware (isp_2300 one from ispfw) it just that
the code also tries to get an IT version of it and for fibre channel
cards there is no such thing.  The patch I gave should remove this
nuisance BUT NOT FIX target mode.

You need to rebuild the kernel with:

options KDB
options DDB

and when you panic, do a "bt" and copy the stack trace so we know
WHERE exactly its panicing on your 23xxx setup.  Can you post your
kernel configuration file as well?

Thanks!

-aps


More information about the freebsd-scsi mailing list