From owner-cvs-all Mon Feb 19 20:31: 5 2001 Delivered-To: cvs-all@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 4B08E37B401; Mon, 19 Feb 2001 20:31:00 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.1/8.11.1) id f1K4UxW42792; Mon, 19 Feb 2001 20:30:59 -0800 (PST) (envelope-from rizzo) From: Luigi Rizzo Message-Id: <200102200430.f1K4UxW42792@iguana.aciri.org> Subject: Re: cvs commit: src/sys/pci if_dc.c In-Reply-To: <200102200421.f1K4LSZ48854@freefall.freebsd.org> from Warner Losh at "Feb 19, 2001 8:21:28 pm" To: imp@FreeBSD.org (Warner Losh) Date: Mon, 19 Feb 2001 20:30:58 -0800 (PST) Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > imp 2001/02/19 20:21:28 PST > > Modified files: > sys/pci if_dc.c > Log: > Add DC_UNLOCK before first return. This caused returns when dc was on > a shared interrupt. sorry for missing that -- but i wonder, can't we just move the test if ( (CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0) return ; before the call to DC_LOCK and the assignment to ifp ? We are just reading from the register here, and the only possible race that i can think of is someone removing the descriptor under our feed, which i presume cannot occur. The whole point of the above patch was avoid paying big cost when we are called for no reason. cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message