From owner-cvs-all@FreeBSD.ORG Tue Dec 2 04:36:01 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1A7116A4CE; Tue, 2 Dec 2003 04:36:01 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3797C43F85; Tue, 2 Dec 2003 04:36:01 -0800 (PST) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hB2Ca0XJ031144; Tue, 2 Dec 2003 04:36:00 -0800 (PST) (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hB2Ca0AF031143; Tue, 2 Dec 2003 04:36:00 -0800 (PST) (envelope-from bde) Message-Id: <200312021236.hB2Ca0AF031143@repoman.freebsd.org> From: Bruce Evans Date: Tue, 2 Dec 2003 04:36:00 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/i386/isa cy.c src/sys/pci cy_pci.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 12:36:02 -0000 bde 2003/12/02 04:36:00 PST FreeBSD src repository Modified files: sys/i386/isa cy.c sys/pci cy_pci.c Log: Fixed breakage of the pci case of the cy driver by the new interrupt code. Both the driver and the new code were wrong. Driver interrupt handlers are supposed to take "void *vsc" arg, but some including all COMPAT_ISA drivers and the pci part of the cy driver want an "int unit" arg. They got this using bogus casts of function pointers which should have kept working despite their bogusness. However, the new interrupt code doesn't honor requests to pass an arg of ((void *)0), so things are very broken if the arg is actually a representation of unit 0. The fix is to use a normal "void *vsc" arg for the pci case and a wrapper for the COMPAT_ISA case (of the cy driver). This cleans up new-busification of the pci case but takes the COMPAT_ISA case a little further from new-bus. The corresponding bug for the COMPAT_ISA case has already been fixed similarly using a wrapper in compat_isa.c and we need another wrapper just to undo that. Fixed some directly related style bugs (mainly by removing compatibility cruft). cy.c: Fixed an indirectly related old bug in cyattach_common(). A wrong status was returned in the unlikely event that malloc() failed. Approved by: re (scottl) Revision Changes Path 1.137 +32 -31 src/sys/i386/isa/cy.c 1.30 +8 -17 src/sys/pci/cy_pci.c