/********************************************************************* * * Filename: irda.h * Version: 1.0 * Description: IrDA common include file for kernel internal use * Status: Stable * Author: Dag Brattli * Created at: Tue Dec 9 21:13:12 1997 * Modified at: Fri Jan 28 13:16:32 2000 * Modified by: Dag Brattli * * Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved. * Copyright (c) 2000-2002 Jean Tourrilhes * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Neither Dag Brattli nor University of Tromsø admit liability nor * provide warranty for any of this software. This material is * provided "AS-IS" and at no charge. * ********************************************************************/ #ifndef NET_IRDA_H #define NET_IRDA_H #include /* struct sk_buff */ #include #include /* sa_family_t in */ #include typedef __u32 magic_t; #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif /* Hack to do small backoff when setting media busy in IrLAP */ #ifndef SMALL #define SMALL 5 #endif #ifndef IRDA_MIN /* Lets not mix this MIN with other header files */ #define IRDA_MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif #ifndef IRDA_ALIGN # define IRDA_ALIGN __attribute__((aligned)) #endif #ifdef CONFIG_IRDA_DEBUG #define IRDA_ASSERT(expr, func) \ do { if(!(expr)) { \ printk( "Assertion failed! %s:%s:%d %s\n", \ __FILE__,__func__,__LINE__,(#expr) ); \ func } } while (0) #define IRDA_ASSERT_LABEL(label) label #else #define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0) #define IRDA_ASSERT_LABEL(label) #endif /* CONFIG_IRDA_DEBUG */ /* * Magic numbers used by Linux-IrDA. Random numbers which must be unique to * give the best protection */ #define IRTTY_MAGIC 0x2357 #define LAP_MAGIC 0x1357 #define LMP_MAGIC 0x4321 #define LMP_LSAP_MAGIC 0x69333 #define LMP_LAP_MAGIC 0x3432 #define IRDA_DEVICE_MAGIC 0x63454 #define IAS_MAGIC 0x007 #define TTP_MAGIC 0x241169 #define TTP_TSAP_MAGIC 0x4345 #define IROBEX_MAGIC 0x341324 #define HB_MAGIC 0x64534 #define IRLAN_MAGIC 0x754 #define IAS_OBJECT_MAGIC 0x34234 #define IAS_ATTRIB_MAGIC 0x45232 #define IRDA_TASK_MAGIC 0x38423 #define IAS_DEVICE_ID 0x0000 /* Defined by IrDA, IrLMP section 4.1 (page 68) */ #define IAS_PNP_ID 0xd342 #define IAS_OBEX_ID 0x34323 #define IAS_IRLAN_ID 0x34234 #define IAS_IRCOMM_ID 0x2343 #define IAS_IRLPT_ID 0x9876 struct net_device; struct packet_type; void irda_proc_register(void); void irda_proc_unregister(void); int irda_sysctl_register(void); void irda_sysctl_unregister(void); int irsock_init(void); void irsock_cleanup(void); int irda_nl_register(void); void irda_nl_unregister(void); int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype, struct net_device *orig_dev); #endif /* NET_IRDA_H */ class='ctrl'>space:mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-01-27 15:00:45 -0600
committerBjorn Helgaas <bhelgaas@google.com>2017-01-27 15:00:45 -0600
commit030305d69fc6963c16003f50d7e8d74b02d0a143 (patch)
tree363a4e34d199178769b7e7eeb26ea2620a55847b /net/rxrpc/Makefile
parent4d191b1b63c209e37bf27938ef365244d3c41084 (diff)
PCI/ASPM: Handle PCI-to-PCIe bridges as roots of PCIe hierarchies
In a struct pcie_link_state, link->root points to the pcie_link_state of the root of the PCIe hierarchy. For the topmost link, this points to itself (link->root = link). For others, we copy the pointer from the parent (link->root = link->parent->root). Previously we recognized that Root Ports originated PCIe hierarchies, but we treated PCI/PCI-X to PCIe Bridges as being in the middle of the hierarchy, and when we tried to copy the pointer from link->parent->root, there was no parent, and we dereferenced a NULL pointer: BUG: unable to handle kernel NULL pointer dereference at 0000000000000090 IP: [<ffffffff9e424350>] pcie_aspm_init_link_state+0x170/0x820 Recognize that PCI/PCI-X to PCIe Bridges originate PCIe hierarchies just like Root Ports do, so link->root for these devices should also point to itself. Fixes: 51ebfc92b72b ("PCI: Enumerate switches below PCI-to-PCIe bridges") Link: https://bugzilla.kernel.org/show_bug.cgi?id=193411 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1022181 Tested-by: lists@ssl-mail.com Tested-by: Jayachandran C. <jnair@caviumnetworks.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v4.2+
Diffstat (limited to 'net/rxrpc/Makefile')