Date: Sat, 30 Aug 2008 10:08:53 -0400 From: "Alexander Sack" <pisymbol@gmail.com> To: "Fuujin Networks LLC" <erich@fuujinnetworks.com> Cc: freebsd-scsi@freebsd.org Subject: Re: Qlogic FC scsi_target ISP2310 Message-ID: <3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba@mail.gmail.com> In-Reply-To: <48B8E879.7020809@fuujinnetworks.com> References: <48B4CF57.30603@fuujinnetworks.com> <3c0b01820808271520w78d0f338iaf6996774512b5bb@mail.gmail.com> <48B733CF.5000105@fuujinnetworks.com> <3c0b01820808290914s638c970ejeae1d4f8c8c8a9d9@mail.gmail.com> <3c0b01820808290915t4e964182y784c215e28977252@mail.gmail.com> <48B8E879.7020809@fuujinnetworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 30, 2008 at 2:28 AM, Fuujin Networks LLC <erich@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba>