From owner-freebsd-hackers Tue Dec 7 18: 7:42 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from screech.weirdnoise.com (209-128-78-198.bayarea.net [209.128.78.198]) by hub.freebsd.org (Postfix) with ESMTP id B8C0614FEC; Tue, 7 Dec 1999 18:07:06 -0800 (PST) (envelope-from edhall@screech.weirdnoise.com) Received: from screech.weirdnoise.com (localhost [127.0.0.1]) by screech.weirdnoise.com (8.8.7/8.8.7) with ESMTP id SAA11430; Tue, 7 Dec 1999 18:08:08 -0800 Message-Id: <199912080208.SAA11430@screech.weirdnoise.com> X-Mailer: exmh version 2.0.2 To: Peter Wemm Cc: Matthew Dillon , "Jonathan M. Bresler" , kris@hub.freebsd.org, freebsd-hackers@FreeBSD.ORG Date: Tue, 07 Dec 1999 18:08:08 -0800 From: Ed Hall Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Subject: Re: PCI DMA lockups in 3.2 (3.3 maybe?) In-Reply-To: Your message of "Tue, 07 Dec 1999 20:01:39 +0800." <19991207120139.869F01CC6@overcee.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii -------- I just reviewed the (so far) working 3.3 test system. I was mistaken about the 4.0 driver; looks like you didn't get around to that. You have a wrapper around ncr_intr() that sets up guard areas--and a call to splcam() that might well be what's stabilizing things. Here are the diffs (preceded by the CVS ident string): ** $FreeBSD: src/sys/pci/ncr.c,v 1.141.2.4 1999/08/29 16:31:53 peter Exp $ % diff /tmp/ncr.c ncr.c *** /tmp/ncr.c Tue Dec 7 15:37:50 1999 --- ncr.c Thu Oct 28 11:41:56 1999 *************** *** 3314,3319 **** --- 3314,3325 ---- found = -1; for (i = 0; i < sizeof(ncr_chip_table)/sizeof(ncr_chip_table[0]); i++) { + /* + * Ignore chips that support LOAD/STORE, so the sym_hipd driver will + * attach them without any conflict. + */ + if (ncr_chip_table[i].features & FE_LDSTR) + continue; if (device_id == ncr_chip_table[i].device_id && ncr_chip_table[i].minrevid <= revision_id) { if (found < 0 || *************** *** 3872,3883 **** **========================================================== */ static void ! ncr_intr(vnp) void *vnp; { ncb_p np = vnp; - int oldspl = splcam(); if (DEBUG_FLAGS & DEBUG_TINY) printf ("["); --- 3878,3890 ---- **========================================================== */ + int ncr_int_count = 0; + static void ! ncr_intr1(vnp) void *vnp; { ncb_p np = vnp; if (DEBUG_FLAGS & DEBUG_TINY) printf ("["); *************** *** 3893,3900 **** }; if (DEBUG_FLAGS & DEBUG_TINY) printf ("]\n"); ! splx (oldspl); } /*========================================================== --- 3900,3932 ---- }; if (DEBUG_FLAGS & DEBUG_TINY) printf ("]\n"); + } + + #define GUARDS 16 ! static void ! ncr_intr(vnp) ! void *vnp; ! { ! int i; ! int clobber; ! int guard[GUARDS]; ! ! clobber = 0; ! for (i = 0; i < GUARDS; i++) ! guard[i] = 0xcafebabe; ! ! ncr_int_count++; ! ncr_intr1(vnp); ! ! for (i = 0; i < GUARDS; i++) { ! if (guard[i] != 0xcafebabe) { ! printf("guard[%d] = 0x%x\n", i, guard[i]); ! clobber++; ! } ! } ! if (clobber != 0) ! panic("ncr_intr: stack clobber 0x%x\n", clobber); } /*========================================================== *************** *** 4878,4884 **** --- 4910,4920 ---- static void ncr_poll(struct cam_sim *sim) { + int oldspl; + + oldspl = splcam(); ncr_intr(cam_sim_softc(sim)); + splx(oldspl); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message