Date: Thu, 23 Feb 2012 13:44:10 -0800 From: Chuck Tuffli <chuck@tuffli.net> To: freebsd-scsi <freebsd-scsi@freebsd.org> Subject: CTL panic Message-ID: <CAM0tzX1TQK9E51DAQ2px=pPjEm%2B6JgbxrGDiE=LcxLyekNnvvw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I just tried using our targ(9) compatible driver with CTL today and get the below panic. Our driver didn't recognize the XPT_IMMEDIATE_NOTIFY and returned CAM_REQ_INVALID which ctlfedone doesn't handle explicitly. The following patch seems to avoid this problem for me, but there might be a better fix. index 1d547d5..704a08c 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -1456,6 +1456,11 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb) */ send_ctl_io = 0; break; + case CAM_REQ_INVALID: + ctl_free_io(io); + ctlfe_free_ccb(periph, done_ccb); + return; + break; default: xpt_print(periph->path, "%s: " "unsupported CAM status 0x%x\n", console: Feb 23 11:32:36 elx0 kernel: ctlfeasync: calling ctl_frontend_register() for ocs0 Feb 23 11:32:36 elx0 kernel: ocs0: XPT_EN_LUN enable -1:-1 Feb 23 11:32:36 elx0 kernel: ocs0: unhandled func_code = 0x336 Feb 23 11:32:36 elx0 kernel: (ctl0:ocs0:0:-1:-1): ctlferegister: could not allocate immediate notify CCBs, status 0x6 Feb 23 11:32:36 elx0 kernel: ctlfedone: got XPT_IMMEDIATE_NOTIFY status 0x6 tag 0x66533f3 seq 0x1b56c0b9 Feb 23 11:32:36 elx0 kernel: (ctl0:nobus:X:X): ctlfedone: unsupported CAM status 0x6 Feb 23 11:32:36 elx0 kernel: Feb 23 11:32:36 elx0 kernel: Feb 23 11:32:36 elx0 kernel: Fatal trap 12: page fault while in kernel mode Feb 23 11:32:36 elx0 kernel: cpuid = 6; apic id = 06 Feb 23 11:32:36 elx0 kernel: fault virtual address = 0x58 Feb 23 11:32:36 elx0 kernel: fault code = supervisor read data, page not present Feb 23 11:32:36 elx0 kernel: instruction pointer = 0x20:0xffffffff802cc386 Feb 23 11:32:36 elx0 kernel: stack pointer = 0x28:0xffffff80002d5a40 Feb 23 11:32:36 elx0 kernel: frame pointer = 0x28:0xffffff80002d5a50 Feb 23 11:32:36 elx0 kernel: code segment = base 0x0, limit 0xfffff, type 0x1b Feb 23 11:32:36 elx0 kernel: = DPL 0, pres 1, long 1, def32 0, gran 1 Feb 23 11:32:36 elx0 kernel: processor eflags = interrupt enabled, resume, IOPL = 0 Feb 23 11:32:36 elx0 kernel: current process = 12 (swi2: cambio) Feb 23 11:32:36 elx0 kernel: trap number = 12 Feb 23 11:32:36 elx0 kernel: panic: page fault Feb 23 11:32:36 elx0 kernel: cpuid = 6 Feb 23 11:32:36 elx0 kernel: KDB: stack backtrace: Feb 23 11:32:36 elx0 kernel: #0 0xffffffff808afb8e at kdb_backtrace+0x5e Feb 23 11:32:36 elx0 kernel: #1 0xffffffff80878617 at panic+0x187 Feb 23 11:32:36 elx0 kernel: #2 0xffffffff80b6b850 at trap_fatal+0x290 Feb 23 11:32:36 elx0 kernel: #3 0xffffffff80b6bbc6 at trap_pfault+0x226 Feb 23 11:32:36 elx0 kernel: #4 0xffffffff80b6c08f at trap+0x39f Feb 23 11:32:36 elx0 kernel: #5 0xffffffff80b56293 at calltrap+0x8 Feb 23 11:32:36 elx0 kernel: #6 0xffffffff80308b17 at ctlfedone+0x407 Feb 23 11:32:36 elx0 kernel: #7 0xffffffff802d1943 at camisr_runqueue+0x63 Feb 23 11:32:36 elx0 kernel: #8 0xffffffff802d1d61 at camisr+0x101 Feb 23 11:32:36 elx0 kernel: #9 0xffffffff8084d054 at intr_event_execute_handlers+0x104 Feb 23 11:32:36 elx0 kernel: #10 0xffffffff8084e814 at ithread_loop+0xa4 Feb 23 11:32:36 elx0 kernel: #11 0xffffffff80849c7f at fork_exit+0x11f Feb 23 11:32:36 elx0 kernel: #12 0xffffffff80b567be at fork_trampoline+0xe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM0tzX1TQK9E51DAQ2px=pPjEm%2B6JgbxrGDiE=LcxLyekNnvvw>