#ifndef __NET_NCSI_H #define __NET_NCSI_H /* * The NCSI device states seen from external. More NCSI device states are * only visible internally (in net/ncsi/internal.h). When the NCSI device * is registered, it's in ncsi_dev_state_registered state. The state * ncsi_dev_state_start is used to drive to choose active package and * channel. After that, its state is changed to ncsi_dev_state_functional. * * The state ncsi_dev_state_stop helps to shut down the currently active * package and channel while ncsi_dev_state_config helps to reconfigure * them. */ enum { ncsi_dev_state_registered = 0x0000, ncsi_dev_state_functional = 0x0100, ncsi_dev_state_probe = 0x0200, ncsi_dev_state_config = 0x0300, ncsi_dev_state_suspend = 0x0400, }; struct ncsi_dev { int state; int link_up; struct net_device *dev; void (*handler)(struct ncsi_dev *ndev); }; #ifdef CONFIG_NET_NCSI struct ncsi_dev *ncsi_register_dev(struct net_device *dev, void (*notifier)(struct ncsi_dev *nd)); int ncsi_start_dev(struct ncsi_dev *nd); void ncsi_stop_dev(struct ncsi_dev *nd); void ncsi_unregister_dev(struct ncsi_dev *nd); #else /* !CONFIG_NET_NCSI */ static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev, void (*notifier)(struct ncsi_dev *nd)) { return NULL; } static inline int ncsi_start_dev(struct ncsi_dev *nd) { return -ENOTTY; } static void ncsi_stop_dev(struct ncsi_dev *nd) { } static inline void ncsi_unregister_dev(struct ncsi_dev *nd) { } #endif /* CONFIG_NET_NCSI */ #endif /* __NET_NCSI_H */ r> summaryrefslogtreecommitdiff
path: root/include/xen/arm
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2017-01-28 11:52:02 +0100
committerHelge Deller <deller@gmx.de>2017-01-28 21:54:23 +0100
commit2ad5d52d42810bed95100a3d912679d8864421ec (patch)
tree7f93e2f906b1c86f5b76c0f4c0978d41a8a29861 /include/xen/arm
parent83b5d1e3d3013dbf90645a5d07179d018c8243fa (diff)
parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header
In swab.h the "#if BITS_PER_LONG > 32" breaks compiling userspace programs if BITS_PER_LONG is #defined by userspace with the sizeof() compiler builtin. Solve this problem by using __BITS_PER_LONG instead. Since we now #include asm/bitsperlong.h avoid further potential userspace pollution by moving the #define of SHIFT_PER_LONG to bitops.h which is not exported to userspace. This patch unbreaks compiling qemu on hppa/parisc. Signed-off-by: Helge Deller <deller@gmx.de> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'include/xen/arm')