Date: Mon, 19 Feb 2001 20:38:36 -0500 (EST) From: "Matthew N. Dodd" <winter@jurai.net> To: "Justin T. Gibbs" <gibbs@scsiguy.com> Cc: Joerg Wunsch <joerg_wunsch@interface-systems.de>, freebsd-scsi@FreeBSD.ORG Subject: Re: Problems with AIC7770-based controller on -current Message-ID: <Pine.BSF.4.21.0102192028130.884-100000@sasami.jurai.net> In-Reply-To: <200102151755.f1FHsxO65022@aslan.scsiguy.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Feb 2001, Justin T. Gibbs wrote: > >CPU0 stopping CPUs: 0x00000002... stopped. > >Stopped at ahc_match_scb+0x18: movl 0(%esi),%eax > >db> t > >ahc_match_scb(c05a8a00,0,5,41,0,ff,0) at ahc_match_scb+0x18 > > I still cannot reproduce this here. If it is very reproduceable > for you, perhaps you can modify ahc_search_qinfifo so that the > return from ahc_lookup_scb() is always tested for NULL. In > the case of a NULL lookup, print the scb_index used for the > lookup, call ahc_dump_card_state(), and panic. Perhaps with > that info I can figure out what is going on. Using the following patch I booted a kernel built from ~1 day old -CURRENT. It didn't even hit ahc_search_qinfifo(). Panic follows patch. Index: aic7xxx.c =================================================================== RCS file: /cvs/src/sys/dev/aic7xxx/aic7xxx.c,v retrieving revision 1.69 diff -u -r1.69 aic7xxx.c --- aic7xxx.c 2001/02/10 18:04:27 1.69 +++ aic7xxx.c 2001/02/20 01:09:01 @@ -4855,6 +4855,12 @@ while (qinpos != qintail) { scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinpos]); + if (scb == NULL) { + printf("%s - %d\n", __FUNCTION__ , __LINE__ ); + printf("scb_index = %d\n", ahc->qinfifo[qinpos]); + ahc_dump_card_state(ahc); + panic("ahc_lookup_scb() returned NULL!\n"); + } if (ahc_match_scb(ahc, scb, target, channel, lun, tag, role)) { /* * We found an scb that needs to be acted on. @@ -4915,6 +4921,12 @@ * the DMA. */ scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinstart]); + if (scb == NULL) { + printf("%s - %d\n", __FUNCTION__ , __LINE__ ); + printf("scb_index = %d\n", ahc->qinfifo[qinstart]); + ahc_dump_card_state(ahc); + panic("ahc_lookup_scb() returned NULL!\n"); + } /* * ahc_swap_with_next_hscb forces our next pointer to @@ -4934,6 +4946,12 @@ /* Fixup the tail "next" pointer. */ qintail = ahc->qinfifonext - 1; scb = ahc_lookup_scb(ahc, ahc->qinfifo[qintail]); + if (scb == NULL) { + printf("%s - %d\n", __FUNCTION__ , __LINE__ ); + printf("scb_index = %d\n", ahc->qinfifo[qintail]); + ahc_dump_card_state(ahc); + panic("ahc_lookup_scb() returned NULL!\n"); + } scb->hscb->next = ahc->next_queued_scb->hscb->tag; } @@ -4957,6 +4975,12 @@ panic("for safety"); } scb = ahc_lookup_scb(ahc, scb_index); + if (scb == NULL) { + printf("%s - %d\n", __FUNCTION__ , __LINE__ ); + printf("scb_index = %d\n", scb_index); + ahc_dump_card_state(ahc); + panic("ahc_lookup_scb() returned NULL!\n"); + } if (ahc_match_scb(ahc, scb, target, channel, lun, SCB_LIST_NULL, role)) { /* ahc0: No free or disconnected SCBs ahc0: Dumping Card State at SEQADDR 0x19a SCB count = 20 Kernel NEXTQSCB = 8 Card NEXTQSCB = 9 QINFIFO entries: 9 Waiting Queue entries: 3:6 Disconnected Queue entries: QOUTFIFO entries: Sequencer Free SCB List: Pending list: 9 6 19 2 7 15 Kernel Free SCB list: 16 17 18 0 1 3 4 5 14 13 12 11 10 Untagged Q(0): 15 2 Untagged Q(1): 7 19 Untagged Q(2): 6 Untagged Q(3): 9 panic: for safety cpuid = 0; lapic.id = 00000000 Debugger("panic") CPU0 stopping CPUs: 0x00000002... stopped. Stopped at Debugger+0x45: pushl %ebx db> t Debugger(c02aacc1) at Debugger+0x45 panic(c02a0daa,c05a8a00,c02a12c0,c05a3540,c05a8a00) at panic+0xd0 ahc_handle_seqint(c05a8a00,d1) at ahc_handle_seqint+0x904 ahc_platform_intr(c05a8a00) at ahc_platform_intr+0x11e ithread_loop(c0a79000,c6134fa8) at ithread_loop+0x117 fork_exit(c016f6a4,c0a79000,c6134fa8) at fork_exit+0x58 fork_trampoline() at fork_trampoline+0x8 db> -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0102192028130.884-100000>