Module Name: src Committed By: dyoung Date: Thu Mar 18 20:52:43 UTC 2010
Modified Files: src/sys/dev/cardbus: if_fxp_cardbus.c Log Message: Simplify interrupt (dis)establishment by two source transformations: - cardbus_intr_disestablish(cc, cf, ih); + Cardbus_intr_disestablish(ct, ih); - ih = cardbus_intr_establish(cc, cf, ...); + ih = Cardbus_intr_establish(ct, ...); The identical change to a few other CardBus NICs has not caused any problems, as expected, so I'm going to commit this rather safe change and get on with the work. Testers have been enlisted. I will revisit this change if I get any negative responses. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/dev/cardbus/if_fxp_cardbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/cardbus/if_fxp_cardbus.c diff -u src/sys/dev/cardbus/if_fxp_cardbus.c:1.46 src/sys/dev/cardbus/if_fxp_cardbus.c:1.47 --- src/sys/dev/cardbus/if_fxp_cardbus.c:1.46 Fri Feb 26 00:57:02 2010 +++ src/sys/dev/cardbus/if_fxp_cardbus.c Thu Mar 18 20:52:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_cardbus.c,v 1.46 2010/02/26 00:57:02 dyoung Exp $ */ +/* $NetBSD: if_fxp_cardbus.c,v 1.47 2010/03/18 20:52:43 dyoung Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.46 2010/02/26 00:57:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.47 2010/03/18 20:52:43 dyoung Exp $"); #include "opt_inet.h" #include "rnd.h" @@ -212,8 +212,7 @@ fxp_cardbus_enable(struct fxp_softc * sc) { struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *)sc; - cardbus_chipset_tag_t cc = csc->ct->ct_cc; - cardbus_function_tag_t cf = csc->ct->ct_cf; + cardbus_devfunc_t ct = csc->ct; Cardbus_function_enable(csc->ct); @@ -221,7 +220,7 @@ /* Map and establish the interrupt. */ - sc->sc_ih = cardbus_intr_establish(cc, cf, csc->intrline, IPL_NET, + sc->sc_ih = Cardbus_intr_establish(ct, csc->intrline, IPL_NET, fxp_intr, sc); if (NULL == sc->sc_ih) { aprint_error_dev(sc->sc_dev, "couldn't establish interrupt\n"); @@ -235,12 +234,10 @@ fxp_cardbus_disable(struct fxp_softc * sc) { struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *)sc; - struct cardbus_devfunc *ct = csc->ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; + cardbus_devfunc_t ct = csc->ct; /* Remove interrupt handler. */ - cardbus_intr_disestablish(cc, cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); Cardbus_function_disable(csc->ct); } @@ -263,7 +260,7 @@ /* * Unhook the interrupt handler. */ - cardbus_intr_disestablish(ct->ct_cc, ct->ct_cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); /* * release bus space and close window