puc.c (227293) | puc.c (245471) |
---|---|
1/*- 2 * Copyright (c) 2006 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/puc/puc.c 227293 2011-11-07 06:44:47Z ed $"); | 28__FBSDID("$FreeBSD: head/sys/dev/puc/puc.c 245471 2013-01-15 20:13:25Z jhb $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34#include <sys/conf.h> 35#include <sys/malloc.h> 36#include <sys/mutex.h> --- 580 unchanged lines hidden (view full) --- 617 return (EINVAL); 618 619 port = device_get_ivars(child); 620 KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); 621 622 if (cookiep == NULL || res != port->p_ires) 623 return (EINVAL); 624 /* We demand that serdev devices use filter_only interrupts. */ | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/bus.h> 34#include <sys/conf.h> 35#include <sys/malloc.h> 36#include <sys/mutex.h> --- 580 unchanged lines hidden (view full) --- 617 return (EINVAL); 618 619 port = device_get_ivars(child); 620 KASSERT(port != NULL, ("%s %d", __func__, __LINE__)); 621 622 if (cookiep == NULL || res != port->p_ires) 623 return (EINVAL); 624 /* We demand that serdev devices use filter_only interrupts. */ |
625 if (ihand != NULL) | 625 if (port->p_type == PUC_TYPE_SERIAL && ihand != NULL) |
626 return (ENXIO); 627 if (rman_get_device(port->p_ires) != originator) 628 return (ENXIO); 629 630 /* 631 * Have non-serdev ports handled by the bus implementation. It 632 * supports multiple handlers for a single interrupt as it is, 633 * so we wouldn't add value if we did it ourselves. --- 133 unchanged lines hidden --- | 626 return (ENXIO); 627 if (rman_get_device(port->p_ires) != originator) 628 return (ENXIO); 629 630 /* 631 * Have non-serdev ports handled by the bus implementation. It 632 * supports multiple handlers for a single interrupt as it is, 633 * so we wouldn't add value if we did it ourselves. --- 133 unchanged lines hidden --- |