fdc.c (153167) | fdc.c (155921) |
---|---|
1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu) --- 36 unchanged lines hidden (view full) --- 45 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 46 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 48 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 50 * SUCH DAMAGE. 51 * 52 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 | 1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu) --- 36 unchanged lines hidden (view full) --- 45 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 46 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 48 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 50 * SUCH DAMAGE. 51 * 52 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 |
53 * $FreeBSD: head/sys/pc98/cbus/fdc.c 153167 2005-12-06 13:22:14Z ru $ | 53 * $FreeBSD: head/sys/pc98/cbus/fdc.c 155921 2006-02-22 18:16:26Z jhb $ |
54 */ 55 56#include "opt_fdc.h" 57 58#include <sys/param.h> 59#include <sys/bio.h> 60#include <sys/bus.h> 61#include <sys/devicestat.h> --- 587 unchanged lines hidden (view full) --- 649 650void 651fdc_release_resources(struct fdc_data *fdc) 652{ 653 device_t dev; 654 655 dev = fdc->fdc_dev; 656 if (fdc->fdc_intr) { | 54 */ 55 56#include "opt_fdc.h" 57 58#include <sys/param.h> 59#include <sys/bio.h> 60#include <sys/bus.h> 61#include <sys/devicestat.h> --- 587 unchanged lines hidden (view full) --- 649 650void 651fdc_release_resources(struct fdc_data *fdc) 652{ 653 device_t dev; 654 655 dev = fdc->fdc_dev; 656 if (fdc->fdc_intr) { |
657 BUS_TEARDOWN_INTR(device_get_parent(dev), dev, fdc->res_irq, 658 fdc->fdc_intr); | 657 bus_teardown_intr(dev, fdc->res_irq, fdc->fdc_intr); |
659 fdc->fdc_intr = NULL; 660 } 661 if (fdc->res_irq != 0) { 662 bus_deactivate_resource(dev, SYS_RES_IRQ, fdc->rid_irq, 663 fdc->res_irq); 664 bus_release_resource(dev, SYS_RES_IRQ, fdc->rid_irq, 665 fdc->res_irq); 666 fdc->res_irq = NULL; --- 151 unchanged lines hidden (view full) --- 818int 819fdc_attach(device_t dev) 820{ 821 struct fdc_data *fdc; 822 int error; 823 824 fdc = device_get_softc(dev); 825 fdc->fdc_dev = dev; | 658 fdc->fdc_intr = NULL; 659 } 660 if (fdc->res_irq != 0) { 661 bus_deactivate_resource(dev, SYS_RES_IRQ, fdc->rid_irq, 662 fdc->res_irq); 663 bus_release_resource(dev, SYS_RES_IRQ, fdc->rid_irq, 664 fdc->res_irq); 665 fdc->res_irq = NULL; --- 151 unchanged lines hidden (view full) --- 817int 818fdc_attach(device_t dev) 819{ 820 struct fdc_data *fdc; 821 int error; 822 823 fdc = device_get_softc(dev); 824 fdc->fdc_dev = dev; |
826 error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq, | 825 error = bus_setup_intr(dev, fdc->res_irq, |
827 INTR_TYPE_BIO | INTR_ENTROPY, fdc_intr, fdc, 828 &fdc->fdc_intr); 829 if (error) { 830 device_printf(dev, "cannot setup interrupt\n"); 831 return error; 832 } 833 fdc->fdcu = device_get_unit(dev); 834 fdc->flags |= FDC_NEEDS_RESET; --- 1776 unchanged lines hidden --- | 826 INTR_TYPE_BIO | INTR_ENTROPY, fdc_intr, fdc, 827 &fdc->fdc_intr); 828 if (error) { 829 device_printf(dev, "cannot setup interrupt\n"); 830 return error; 831 } 832 fdc->fdcu = device_get_unit(dev); 833 fdc->flags |= FDC_NEEDS_RESET; --- 1776 unchanged lines hidden --- |