Deleted Added
full compact
puc.c (109458) puc.c (109623)
1/* $NetBSD: puc.c,v 1.7 2000/07/29 17:43:38 jlam Exp $ */
2
3/*-
4 * Copyright (c) 2002 JF Hay. All rights reserved.
5 * Copyright (c) 2000 M. Warner Losh. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 44 unchanged lines hidden (view full) ---

53 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
54 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
57 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58 */
59
60#include <sys/cdefs.h>
1/* $NetBSD: puc.c,v 1.7 2000/07/29 17:43:38 jlam Exp $ */
2
3/*-
4 * Copyright (c) 2002 JF Hay. All rights reserved.
5 * Copyright (c) 2000 M. Warner Losh. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 44 unchanged lines hidden (view full) ---

53 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
54 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
57 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58 */
59
60#include <sys/cdefs.h>
61__FBSDID("$FreeBSD: head/sys/dev/puc/puc.c 109458 2003-01-18 02:54:16Z marcel $");
61__FBSDID("$FreeBSD: head/sys/dev/puc/puc.c 109623 2003-01-21 08:56:16Z alfred $");
62
63/*
64 * PCI "universal" communication card device driver, glues com, lpt,
65 * and similar ports to PCI via bridge chip often much larger than
66 * the devices being glued.
67 *
68 * Author: Christopher G. Demetriou, May 14, 1998 (derived from NetBSD
69 * sys/dev/pci/pciide.c, revision 1.6).

--- 173 unchanged lines hidden (view full) ---

243 rman_get_start(res) + sc->sc_desc->ports[i].offset + 8 - 1,
244 8);
245 rle = resource_list_find(&pdev->resources, type, 0);
246
247 if (sc->barmuxed == 0) {
248 rle->res = sc->sc_bar_mappings[bidx].res;
249 } else {
250 rle->res = malloc(sizeof(struct resource), M_DEVBUF,
62
63/*
64 * PCI "universal" communication card device driver, glues com, lpt,
65 * and similar ports to PCI via bridge chip often much larger than
66 * the devices being glued.
67 *
68 * Author: Christopher G. Demetriou, May 14, 1998 (derived from NetBSD
69 * sys/dev/pci/pciide.c, revision 1.6).

--- 173 unchanged lines hidden (view full) ---

243 rman_get_start(res) + sc->sc_desc->ports[i].offset + 8 - 1,
244 8);
245 rle = resource_list_find(&pdev->resources, type, 0);
246
247 if (sc->barmuxed == 0) {
248 rle->res = sc->sc_bar_mappings[bidx].res;
249 } else {
250 rle->res = malloc(sizeof(struct resource), M_DEVBUF,
251 M_WAITOK | M_ZERO);
251 M_ZERO);
252 if (rle->res == NULL) {
253 free(pdev, M_DEVBUF);
254 return (ENOMEM);
255 }
256
257 rle->res->r_start = rman_get_start(res) +
258 sc->sc_desc->ports[i].offset;
259 rle->res->r_end = rle->res->r_start + 8 - 1;

--- 263 unchanged lines hidden ---
252 if (rle->res == NULL) {
253 free(pdev, M_DEVBUF);
254 return (ENOMEM);
255 }
256
257 rle->res->r_start = rman_get_start(res) +
258 sc->sc_desc->ports[i].offset;
259 rle->res->r_end = rle->res->r_start + 8 - 1;

--- 263 unchanged lines hidden ---