]> git.openfabrics.org - ~emulex/tmp/compat/.git/commitdiff
Backport compat to RHEL6.3
authorVladimir Sokolovsky <vlad@mellanox.com>
Tue, 10 Jul 2012 12:47:14 +0000 (15:47 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 11 Jul 2012 07:48:58 +0000 (10:48 +0300)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
include/linux/compat-2.6.33.h
include/linux/compat-2.6.34.h
include/linux/compat-2.6.35.h
include/linux/compat-2.6.36.h
include/linux/compat-3.1.h
include/linux/compat-3.2.h
include/linux/compat-3.3.h

index 441a331a70ca133f5545946d35cebeb5d61c51e3..ea4e37bdc39441ddc529a80c904a2a68130218f0 100644 (file)
@@ -56,11 +56,15 @@ static inline void compat_release_firmware(const struct firmware *fw)
 #define KEY_RFKILL             247     /* Key that controls all radios */
 #endif
 
+#ifndef IFF_DONT_BRIDGE
 #define IFF_DONT_BRIDGE 0x800          /* disallow bridging this ether dev */
+#endif /* IFF_DONT_BRIDGE */
 /* source: include/linux/if.h */
 
 /* this will never happen on older kernels */
+#ifndef NETDEV_POST_INIT
 #define NETDEV_POST_INIT 0xffff
+#endif /* NETDEV_POST_INIT */
 
 /* mask netdev_alloc_skb_ip_align as debian squeeze also backports this */
 #define netdev_alloc_skb_ip_align(a, b) compat_netdev_alloc_skb_ip_align(a, b)
index b5a40e2a6102d3f8d4f4b463fc26b37c9d70e855..6f1ab5c16ce1881540b26a719f0c6b8a4f0a9630 100644 (file)
@@ -244,7 +244,9 @@ do {                                                        \
  *     enabled.  Lockdep gives a nice error when your attribute is
  *     added to sysfs if you don't have this.
  */
+#ifndef sysfs_bin_attr_init
 #define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr)
+#endif /* sysfs_bin_attr_init */
 
 #define usb_alloc_coherent(dev, size, mem_flags, dma) usb_buffer_alloc(dev, size, mem_flags, dma)
 #define usb_free_coherent(dev, size, addr, dma) usb_buffer_free(dev, size, addr, dma)
index 5798b411fadd4fdaac71e86dd448d6588bca1233..0bcc8f6e2f41b21bae9391c913113c96f02865cb 100644 (file)
@@ -22,6 +22,8 @@
  * was modified in the kernel itself to support this. We
  * treat the system as uni-processor in this case.
  */
+#define irq_set_affinity_hint(a, b) compat_irq_set_affinity_hint(a, b)
+
 static inline int irq_set_affinity_hint(unsigned int irq,
                                        const struct cpumask *m)
 {
@@ -44,6 +46,9 @@ extern loff_t noop_llseek(struct file *file, loff_t offset, int origin);
 
 #define pm_qos_request(_qos) pm_qos_requirement(_qos)
 
+/* mask hex_to_bin as RHEL6.3 backports this */
+#define usb_pipe_endpoint(a, b) compat_usb_pipe_endpoint(a, b)
+
 static inline struct usb_host_endpoint *
 usb_pipe_endpoint(struct usb_device *dev, unsigned int pipe)
 {
index 56d5961916d1564d14bfcc1202525f55a6847ccb..b78f992b7f14daa4d6c6ad3bb5cd0ec6631bcc58 100644 (file)
@@ -94,12 +94,14 @@ struct pm_qos_request_list {
 
 #endif
 
+#ifdef CONFIG_COMPAT_NO_PRINTK_NEEDED
 /*
  * Dummy printk for disabled debugging statements to use whilst maintaining
  * gcc's format and side-effect checking.
  */
 static inline __attribute__ ((format (printf, 1, 2)))
 int no_printk(const char *s, ...) { return 0; }
+#endif /* CONFIG_COMPAT_NO_PRINTK_NEEDED */
 
 #ifndef alloc_workqueue
 #define alloc_workqueue(name, flags, max_active) __create_workqueue(name, flags, max_active, 0)
index cfe166a536c60a33861949f0adecea0f6ba4da48..ff80b8874e412f3da4c7f69177fe3990da4ca561 100644 (file)
@@ -32,6 +32,9 @@ static inline bool ip_is_fragment(const struct iphdr *iph)
        return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0;
 }
 
+/* mask __netdev_alloc_skb_ip_align as RHEL6.3 backports it */
+#define __netdev_alloc_skb_ip_align(a, b, c) compat__netdev_alloc_skb_ip_align(a, b, c)
+
 static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
                                                          unsigned int length, gfp_t gfp)
 {
index 789b4b5fac3e726ca7dcb6521a8f8d06a80e3a5a..c44bec156947da155a3fe607af749df0eba4666d 100644 (file)
@@ -18,6 +18,8 @@
 extern int __ethtool_get_settings(struct net_device *dev,
                                  struct ethtool_cmd *cmd);
 
+#ifdef CONFIG_COMPAT_SKB_FRAG_NEEDED
+
 /**
  * skb_frag_page - retrieve the page refered to by a paged fragment
  * @frag: the paged fragment
@@ -113,6 +115,8 @@ static inline void skb_frag_size_sub(skb_frag_t *frag, int delta)
        frag->size -= delta;
 }
 
+#endif /* CONFIG_COMPAT_SKB_FRAG_NEEDED */
+
 static inline char *hex_byte_pack(char *buf, u8 byte)
 {
        *buf++ = hex_asc_hi(byte);
index 620e661c52d5645bb190c17b80dce201f7cf90c4..3342852e8a1ece1ff8ab0c0361a3e0adb333c4fa 100644 (file)
@@ -11,6 +11,8 @@
 #include <net/sch_generic.h>
 
 #if !((LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,9) && LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,23) && LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)))
+/* mask qdisc_cb_private_validate as RHEL6.3 backports it */
+#define qdisc_cb_private_validate(a, b) compat_qdisc_cb_private_validate(a, b)
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37))
 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
 {