From: Gabor Juhos Date: Fri, 18 May 2012 20:10:33 +0000 (+0000) Subject: x86/ep80579: switch to 3.3 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d9dab97d38ff0e24aa26d9c6ac123381c008db99;p=openwrt%2Fstaging%2Fluka.git x86/ep80579: switch to 3.3 Also fix build errors in the ep80579-drivers package. Compile tested only. SVN-Revision: 31802 --- diff --git a/package/ep80579-drivers/patches/710-3.3-fix-generated-header-locations.patch b/package/ep80579-drivers/patches/710-3.3-fix-generated-header-locations.patch new file mode 100644 index 0000000000..793d08d39b --- /dev/null +++ b/package/ep80579-drivers/patches/710-3.3-fix-generated-header-locations.patch @@ -0,0 +1,91 @@ +--- a/Embedded/src/GbE/Makefile ++++ b/Embedded/src/GbE/Makefile +@@ -60,19 +60,19 @@ GBE_NAME = iegbe + GCU_NAME = gcu + + VERSION_FILE := $(KSRC)/include/linux/version.h +-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h +-CONFIG_FILE := $(KSRC)/include/linux/autoconf.h ++UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h ++CONFIG_FILE := $(KSRC)/include/generated/autoconf.h + + ifeq (,$(wildcard $(VERSION_FILE))) + $(error Linux kernel source not configured - missing version.h) + endif + + ifeq (,$(wildcard $(CONFIG_FILE))) +- $(error Linux kernel source not configured - missing autoconf.h) ++ $(error Linux kernel source not configured - missing autoconf.h) + endif + + ifeq (,$(wildcard $(UTS_REL_FILE))) +- $(error Linux kernel source not configured - missing utsrelease.h) ++ $(error Linux kernel source not configured - missing utsrelease.h) + endif + + # set the install path +--- a/Embedded/src/1588/Makefile ++++ b/Embedded/src/1588/Makefile +@@ -97,8 +97,8 @@ OUTPUT_PATH ?= / + EXTRA_LDFLAGS += -whole-archive + + VERSION_FILE := $(KOBJ)/include/linux/version.h +-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h +-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h ++UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h ++CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h + + + # as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h +--- a/Embedded/src/CAN/Makefile ++++ b/Embedded/src/CAN/Makefile +@@ -100,8 +100,8 @@ OUTPUT_PATH ?= / + EXTRA_LDFLAGS += -whole-archive + + VERSION_FILE := $(KOBJ)/include/linux/version.h +-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h +-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h ++UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h ++CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h + + + # as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h +--- a/Embedded/src/EDMA/Makefile ++++ b/Embedded/src/EDMA/Makefile +@@ -114,8 +114,8 @@ OUTPUT_PATH ?= / + EXTRA_LDFLAGS += -whole-archive + + VERSION_FILE := $(KOBJ)/include/linux/version.h +-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h +-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h ++UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h ++CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h + + + # as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h +--- a/Embedded/src/GPIO/Makefile ++++ b/Embedded/src/GPIO/Makefile +@@ -97,8 +97,8 @@ OUTPUT_PATH ?= / + EXTRA_LDFLAGS += -whole-archive + + VERSION_FILE := $(KOBJ)/include/linux/version.h +-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h +-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h ++UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h ++CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h + + + # as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h +--- a/Embedded/src/WDT/Makefile ++++ b/Embedded/src/WDT/Makefile +@@ -99,8 +99,8 @@ OUTPUT_PATH ?= / + EXTRA_LDFLAGS += -whole-archive + + VERSION_FILE := $(KOBJ)/include/linux/version.h +-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h +-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h ++UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h ++CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h + + + # as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h diff --git a/package/ep80579-drivers/patches/711-3.3-gbe-fixes.patch b/package/ep80579-drivers/patches/711-3.3-gbe-fixes.patch new file mode 100644 index 0000000000..7b2df63984 --- /dev/null +++ b/package/ep80579-drivers/patches/711-3.3-gbe-fixes.patch @@ -0,0 +1,392 @@ +--- a/Embedded/src/GbE/kcompat.h ++++ b/Embedded/src/GbE/kcompat.h +@@ -590,6 +590,10 @@ static inline void _kc_synchronize_irq() + #define ETHTOOL_OPS_COMPAT + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) ++#define HAVE_NETIF_MSG 1 ++#endif ++ + #ifndef HAVE_NETIF_MSG + #define HAVE_NETIF_MSG 1 + enum { +--- a/Embedded/src/GbE/iegbe_main.c ++++ b/Embedded/src/GbE/iegbe_main.c +@@ -159,9 +159,9 @@ static void iegbe_smartspeed(struct iegb + static inline int iegbe_82547_fifo_workaround(struct iegbe_adapter *adapter, + struct sk_buff *skb); + +-static void iegbe_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp); +-static void iegbe_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); +-static void iegbe_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); ++static bool iegbe_vlan_used(struct iegbe_adapter *adapter); ++static int iegbe_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); ++static int iegbe_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); + static void iegbe_restore_vlan(struct iegbe_adapter *adapter); + + static int iegbe_notify_reboot(struct notifier_block *, +@@ -324,8 +324,8 @@ static void iegbe_update_mng_vlan(struct + struct net_device *netdev = adapter->netdev; + u16 vid = hw->mng_cookie.vlan_id; + u16 old_vid = adapter->mng_vlan_id; +- if (adapter->vlgrp) { +- if (!vlan_group_get_device(adapter->vlgrp, vid)) { ++ if (iegbe_vlan_used(adapter)) { ++ if (!test_bit(old_vid, adapter->active_vlans)) { + if (hw->mng_cookie.status & + E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) { + iegbe_vlan_rx_add_vid(netdev, vid); +@@ -335,7 +335,7 @@ static void iegbe_update_mng_vlan(struct + + if ((old_vid != (u16)E1000_MNG_VLAN_NONE) && + (vid != old_vid) && +- !vlan_group_get_device(adapter->vlgrp, old_vid)) ++ !test_bit(old_vid, adapter->active_vlans)) + iegbe_vlan_rx_kill_vid(netdev, old_vid); + } else + adapter->mng_vlan_id = vid; +@@ -736,7 +736,6 @@ static const struct net_device_ops iegbe + .ndo_do_ioctl = iegbe_ioctl, + .ndo_validate_addr = eth_validate_addr, + +- .ndo_vlan_rx_register = iegbe_vlan_rx_register, + .ndo_vlan_rx_add_vid = iegbe_vlan_rx_add_vid, + .ndo_vlan_rx_kill_vid = iegbe_vlan_rx_kill_vid, + #ifdef CONFIG_NET_POLL_CONTROLLER +@@ -767,7 +766,6 @@ static int __devinit iegbe_probe(struct + u16 eeprom_data = 0; + u16 eeprom_apme_mask = E1000_EEPROM_APME; + int bars; +- DECLARE_MAC_BUF(mac); + + bars = pci_select_bars(pdev, IORESOURCE_MEM); + err = pci_enable_device(pdev); +@@ -1247,8 +1245,7 @@ static int iegbe_close(struct net_device + + if ((hw->mng_cookie.status & + E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) && +- !(adapter->vlgrp && +- vlan_group_get_device(adapter->vlgrp, adapter->mng_vlan_id))) { ++ !test_bit(adapter->mng_vlan_id, adapter->active_vlans)) { + iegbe_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id); + } + return 0; +@@ -2163,11 +2160,13 @@ static void iegbe_set_rx_mode(struct net + struct iegbe_hw *hw = &adapter->hw; + struct netdev_hw_addr *ha; + bool use_uc = false; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) + struct dev_addr_list *mc_ptr; +- u32 rctl; + u32 hash_value; +- int i, rar_entries = E1000_RAR_ENTRIES; + int mta_reg_count = E1000_NUM_MTA_REGISTERS; ++#endif ++ u32 rctl; ++ int i, rar_entries = E1000_RAR_ENTRIES; + + /* reserve RAR[14] for LAA over-write work-around */ + if (hw->mac_type == iegbe_82571) +@@ -2220,6 +2219,7 @@ int mta_reg_count = E1000_NUM_MTA_REGIST + + WARN_ON(i == rar_entries); + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) + mc_ptr = netdev->mc_list; + + for (; i < rar_entries; i++) { +@@ -2247,6 +2247,7 @@ int mta_reg_count = E1000_NUM_MTA_REGIST + hash_value = iegbe_hash_mc_addr(hw, mc_ptr->da_addr); + iegbe_mta_set(hw, hash_value); + } ++#endif + + if (hw->mac_type == iegbe_82542_rev2_0) + iegbe_leave_82542_rst(adapter); +@@ -2821,14 +2822,14 @@ static int iegbe_tx_map(struct iegbe_ada + * Avoid terminating buffers within evenly-aligned + * dwords. */ + if(unlikely(adapter->pcix_82544 && +- !((unsigned long)(frag->page+offset+size-1) & 4) && ++ !((unsigned long)(frag->page.p+offset+size-1) & 4) && + size > 4)) + size -= 4; + + buffer_info->length = size; + buffer_info->dma = + pci_map_page(adapter->pdev, +- frag->page, ++ frag->page.p, + offset, + size, + PCI_DMA_TODEVICE); +@@ -3131,7 +3132,7 @@ static int iegbe_xmit_frame(struct sk_bu + } + } + +- if (unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) { ++ if (unlikely(iegbe_vlan_used(adapter) && vlan_tx_tag_present(skb))) { + tx_flags |= E1000_TX_FLAGS_VLAN; + tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT); + } +@@ -3832,10 +3833,12 @@ static bool iegbe_clean_rx_irq(struct ie + + skb->protocol = eth_type_trans(skb, netdev); + +- if (unlikely(adapter->vlgrp && ++ if (unlikely(iegbe_vlan_used(adapter) && + (status & E1000_RXD_STAT_VP))) { +- vlan_hwaccel_receive_skb(skb, adapter->vlgrp, +- le16_to_cpu(rx_desc->special)); ++ u16 vid; ++ ++ vid = le16_to_cpu(rx_desc->special); ++ __vlan_hwaccel_put_tag(skb, vid); + } else { + netif_receive_skb(skb); + } +@@ -3986,9 +3989,10 @@ copydone: + cpu_to_le16(E1000_RXDPS_HDRSTAT_HDRSP))) + adapter->rx_hdr_split++; + +- if(unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) { +- vlan_hwaccel_receive_skb(skb, adapter->vlgrp, +- le16_to_cpu(rx_desc->wb.middle.vlan)); ++ if(unlikely(iegbe_vlan_used(adapter) && (staterr & E1000_RXD_STAT_VP))) { ++ u16 vid; ++ vid = le16_to_cpu(rx_desc->wb.middle.vlan); ++ __vlan_hwaccel_put_tag(skb, vid); + } else { + netif_receive_skb(skb); + } +@@ -4496,17 +4500,25 @@ iegbe_io_write(struct iegbe_hw *hw, unsi + outl(value, port); + } + +-static void iegbe_vlan_rx_register(struct net_device *netdev, +- struct vlan_group *grp) ++static bool iegbe_vlan_used(struct iegbe_adapter *adapter) ++{ ++ u16 vid; ++ ++ for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID) ++ return true; ++ ++ return false; ++} ++ ++static void iegbe_vlan_mode(struct net_device *netdev, bool vlan_on) + { + struct iegbe_adapter *adapter = netdev_priv(netdev); + uint32_t ctrl, rctl; + + if (!test_bit(__E1000_DOWN, &adapter->flags)) + iegbe_irq_disable(adapter); +- adapter->vlgrp = grp; + +- if(grp) { ++ if(vlan_on) { + /* enable VLAN tag insert/strip */ + ctrl = E1000_READ_REG(&adapter->hw, CTRL); + ctrl |= E1000_CTRL_VME; +@@ -4538,30 +4550,37 @@ static void iegbe_vlan_rx_register(struc + iegbe_irq_enable(adapter); + } + +-static void iegbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid) ++static int iegbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid) + { + struct iegbe_adapter *adapter = netdev_priv(netdev); + uint32_t vfta, index; + if((adapter->hw.mng_cookie.status & + E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) && + (vid == adapter->mng_vlan_id)) { +- return; ++ return 0; + } ++ ++ if (!iegbe_vlan_used(adapter)) ++ iegbe_vlan_mode(netdev, true); ++ + /* add VID to filter table */ + index = (vid >> 0x5) & 0x7F; + vfta = E1000_READ_REG_ARRAY(&adapter->hw, VFTA, index); + vfta |= (0x1 << (vid & 0x1F)); + iegbe_write_vfta(&adapter->hw, index, vfta); ++ ++ set_bit(vid, adapter->active_vlans); ++ ++ return 0; + } + +-static void iegbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) ++static int iegbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) + { + struct iegbe_adapter *adapter = netdev_priv(netdev); + u32 vfta, index; + + if (!test_bit(__E1000_DOWN, &adapter->flags)) + iegbe_irq_disable(adapter); +- vlan_group_set_device(adapter->vlgrp, vid, NULL); + if (!test_bit(__E1000_DOWN, &adapter->flags)) + iegbe_irq_enable(adapter); + +@@ -4570,21 +4589,26 @@ static void iegbe_vlan_rx_kill_vid(struc + vfta = E1000_READ_REG_ARRAY(&adapter->hw, VFTA, index); + vfta &= ~(0x1 << (vid & 0x1F)); + iegbe_write_vfta(&adapter->hw, index, vfta); ++ ++ clear_bit(vid, adapter->active_vlans); ++ ++ if (!iegbe_vlan_used(adapter)) ++ iegbe_vlan_mode(netdev, false); ++ ++ return 0; + } + + static void iegbe_restore_vlan(struct iegbe_adapter *adapter) + { +- iegbe_vlan_rx_register(adapter->netdev, adapter->vlgrp); +- +- if (adapter->vlgrp) { + u16 vid; +- for (vid = 0x0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { +- if (!vlan_group_get_device(adapter->vlgrp, vid)) +- continue; ++ ++ if (!iegbe_vlan_used(adapter)) ++ return; ++ ++ iegbe_vlan_mode(adapter->netdev, true); ++ for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID) + iegbe_vlan_rx_add_vid(adapter->netdev, vid); + } +- } +-} + + + int iegbe_set_spd_dplx(struct iegbe_adapter *adapter, u16 spddplx) +@@ -4864,10 +4888,11 @@ iegbe_resume(struct pci_dev *pdev) + default: + break; + } +-#endif + + return 0x0; + } ++#endif ++ + + #ifdef CONFIG_NET_POLL_CONTROLLER + /* +--- a/Embedded/src/GbE/iegbe_ethtool.c ++++ b/Embedded/src/GbE/iegbe_ethtool.c +@@ -327,6 +327,7 @@ iegbe_set_pauseparam(struct net_device * + return 0; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) + static uint32_t + iegbe_get_rx_csum(struct net_device *netdev) + { +@@ -392,6 +393,7 @@ iegbe_set_tso(struct net_device *netdev, + return 0; + } + #endif /* NETIF_F_TSO */ ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */ + + static uint32_t + iegbe_get_msglevel(struct net_device *netdev) +@@ -807,6 +809,7 @@ err_setup_rx: + E1000_82542_##R : E1000_##R; \ + return 1; } } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) + static int + iegbe_reg_test(struct iegbe_adapter *adapter, uint64_t *data) + { +@@ -1710,6 +1713,7 @@ iegbe_diag_test(struct net_device *netde + } + msleep_interruptible(0xfa0); + } ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */ + + static void + iegbe_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) +@@ -1812,6 +1816,7 @@ iegbe_set_wol(struct net_device *netdev, + /* bit defines for adapter->led_status */ + #define E1000_LED_ON 0 + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) + static void + iegbe_led_blink_callback(unsigned long data) + { +@@ -1864,6 +1869,7 @@ iegbe_phys_id(struct net_device *netdev, + + return 0; + } ++#endif + + static int + iegbe_nway_reset(struct net_device *netdev) +@@ -1876,11 +1882,13 @@ iegbe_nway_reset(struct net_device *netd + return 0; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) + static int + iegbe_get_stats_count(struct net_device *netdev) + { + return E1000_STATS_LEN; + } ++#endif + + static void + iegbe_get_ethtool_stats(struct net_device *netdev, +@@ -1936,6 +1944,8 @@ struct ethtool_ops iegbe_ethtool_ops = { + .set_ringparam = iegbe_set_ringparam, + .get_pauseparam = iegbe_get_pauseparam, + .set_pauseparam = iegbe_set_pauseparam, ++ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) + .get_rx_csum = iegbe_get_rx_csum, + .set_rx_csum = iegbe_set_rx_csum, + .get_tx_csum = iegbe_get_tx_csum, +@@ -1946,11 +1956,13 @@ struct ethtool_ops iegbe_ethtool_ops = { + .get_tso = ethtool_op_get_tso, + .set_tso = iegbe_set_tso, + #endif ++ + .self_test_count = iegbe_diag_test_count, + .self_test = iegbe_diag_test, +- .get_strings = iegbe_get_strings, + .phys_id = iegbe_phys_id, + .get_stats_count = iegbe_get_stats_count, ++#endif ++ .get_strings = iegbe_get_strings, + .get_ethtool_stats = iegbe_get_ethtool_stats, + }; + +--- a/Embedded/src/GbE/gcu_main.c ++++ b/Embedded/src/GbE/gcu_main.c +@@ -93,7 +93,7 @@ static struct pci_driver gcu_driver = { + }; + + static struct gcu_adapter *global_adapter = 0; +-static spinlock_t global_adapter_spinlock = SPIN_LOCK_UNLOCKED; ++static DEFINE_SPINLOCK(global_adapter_spinlock); + static unsigned long g_intflags = 0; + + MODULE_AUTHOR("Intel(R) Corporation"); +--- a/Embedded/src/GbE/iegbe.h ++++ b/Embedded/src/GbE/iegbe.h +@@ -257,7 +257,7 @@ struct iegbe_adapter { + struct timer_list tx_fifo_stall_timer; + struct timer_list watchdog_timer; + struct timer_list phy_info_timer; +- struct vlan_group *vlgrp; ++ unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)]; + uint16_t mng_vlan_id; + uint32_t bd_number; + uint32_t rx_buffer_len; diff --git a/package/ep80579-drivers/patches/712-3.3-can-fixes.patch b/package/ep80579-drivers/patches/712-3.3-can-fixes.patch new file mode 100644 index 0000000000..06a09e5139 --- /dev/null +++ b/package/ep80579-drivers/patches/712-3.3-can-fixes.patch @@ -0,0 +1,41 @@ +--- a/Embedded/src/CAN/can_main.c ++++ b/Embedded/src/CAN/can_main.c +@@ -72,6 +72,7 @@ + #include "can_main.h" + #include "can_ioctl.h" + #include ++#include + + + MODULE_AUTHOR("Intel(R) Corporation"); +@@ -110,7 +111,7 @@ struct file_operations file_ops = { + .owner = THIS_MODULE, + .read = can_read, + .write = can_write, +- .ioctl = can_dev_io, ++ .unlocked_ioctl = can_dev_io, + .open = can_open, + .release = can_release + }; +@@ -594,8 +595,7 @@ int icp_can_reset(can_os_t *can_os) + /***************************************************************************** + * Device IO control function. Used by user apps to configure CAN device. + *****************************************************************************/ +-int can_dev_io(struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long arg) ++long can_dev_io(struct file *filp, unsigned int cmd, unsigned long arg) + { + can_os_t *can_os; + unsigned int err=0; +--- a/Embedded/src/CAN/can_main.h ++++ b/Embedded/src/CAN/can_main.h +@@ -157,8 +157,7 @@ ssize_t can_write( + int icp_can_reset( + can_os_t *can_os); + +-int can_dev_io( +- struct inode *inode, ++long can_dev_io( + struct file *filp, + unsigned int cmd, + unsigned long arg); diff --git a/package/ep80579-drivers/patches/713-3.3-gpio-fixes.patch b/package/ep80579-drivers/patches/713-3.3-gpio-fixes.patch new file mode 100644 index 0000000000..47fb920d0a --- /dev/null +++ b/package/ep80579-drivers/patches/713-3.3-gpio-fixes.patch @@ -0,0 +1,33 @@ +--- a/Embedded/src/GPIO/gpio.h ++++ b/Embedded/src/GPIO/gpio.h +@@ -121,8 +121,7 @@ int gpio_init(void); + void gpio_close(void); + int gpio_open(struct inode *inode, struct file *filp); + int gpio_release(struct inode *inode, struct file *filp); +-int gpio_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long arg); ++long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); + + // private driver functions + int gpio_getpininfo(int Signal, char *pBuff); +@@ -134,7 +133,7 @@ struct file_operations file_ops = + .owner = THIS_MODULE, + .open = gpio_open, + .release = gpio_release, +- .ioctl = gpio_ioctl, ++ .unlocked_ioctl = gpio_ioctl, + }; + + #endif +--- a/Embedded/src/GPIO/gpio_ref.c ++++ b/Embedded/src/GPIO/gpio_ref.c +@@ -251,8 +251,7 @@ int gpio_release(struct inode *inode, st + 0 => success + < 0 => error + ******************************************************************************/ +-int gpio_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long arg) ++long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + gpio_ioctl_t Info; + u_int bitstr = 0; diff --git a/package/ep80579-drivers/patches/714-3.3-wdt-fixes.patch b/package/ep80579-drivers/patches/714-3.3-wdt-fixes.patch new file mode 100644 index 0000000000..60cc4aeb73 --- /dev/null +++ b/package/ep80579-drivers/patches/714-3.3-wdt-fixes.patch @@ -0,0 +1,31 @@ +--- a/Embedded/src/WDT/iwdt.c ++++ b/Embedded/src/WDT/iwdt.c +@@ -217,8 +217,7 @@ static int wdt_open(struct inode *inode, + static int wdt_release(struct inode *inode, struct file *file); + static ssize_t wdt_write(struct file *file, const char *data, + size_t count, loff_t * pos); +-static int wdt_ioctl(struct inode *inode, struct file *file, +- unsigned int cmd, unsigned long arg); ++static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg); + static irqreturn_t wdt_isr(int irq, void *dev_id); + static void __exit wdt_cleanup(void); + static int __init wdt_init(void); +@@ -243,7 +242,7 @@ static struct pci_device_id lpc_pci_tbl[ + static struct file_operations wdt_fops = { + owner: THIS_MODULE, + write: wdt_write, +- ioctl: wdt_ioctl, ++ unlocked_ioctl: wdt_ioctl, + open: wdt_open, + release: wdt_release, + }; +@@ -1201,8 +1200,7 @@ char *wdt_get_ioctl_string(unsigned int + * Return Value: 0 - successful, negative value - failed. + * Description: This function is used to provide IO interface. + */ +-static int wdt_ioctl(struct inode *inode, struct file *file, +- unsigned int cmd, unsigned long arg) ++static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + u8 mode=0, scale=0, int_type=0; + u32 u_margin=0, dcount=0; diff --git a/package/ep80579-drivers/patches/715-3.3-1588-fixes.patch b/package/ep80579-drivers/patches/715-3.3-1588-fixes.patch new file mode 100644 index 0000000000..efa19d959d --- /dev/null +++ b/package/ep80579-drivers/patches/715-3.3-1588-fixes.patch @@ -0,0 +1,33 @@ +--- a/Embedded/src/1588/1588.c ++++ b/Embedded/src/1588/1588.c +@@ -664,8 +664,7 @@ irqreturn_t timesync_isr(int irq, void * + 0 => success + < 0 => error + ******************************************************************************/ +-int timesync_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long arg) ++long timesync_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + wait_queue_head_t *event = NULL; + unsigned int bytes_ret = 0; +--- a/Embedded/src/1588/1588.h ++++ b/Embedded/src/1588/1588.h +@@ -121,8 +121,7 @@ MODULE_DEVICE_TABLE(pci, pci_ids); + // Linux functions + int timesync_open(struct inode *inode, struct file *filp); + int timesync_release(struct inode *inode, struct file *filp); +-int timesync_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long arg); ++long timesync_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); + void timesync_close(void); + int pci_suspend(struct pci_dev *dev, pm_message_t state); + int pci_resume(struct pci_dev *dev); +@@ -142,7 +141,7 @@ struct file_operations file_ops = + .owner = THIS_MODULE, + .open = timesync_open, + .release = timesync_release, +- .ioctl = timesync_ioctl, ++ .unlocked_ioctl = timesync_ioctl, + }; + + // Linux pci operations diff --git a/target/linux/x86/ep80579/config-3.3 b/target/linux/x86/ep80579/config-3.3 new file mode 100644 index 0000000000..78ee0ce730 --- /dev/null +++ b/target/linux/x86/ep80579/config-3.3 @@ -0,0 +1,11 @@ +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_HIGHMEM=y +CONFIG_HIGHMEM4G=y +# CONFIG_HIGHPTE is not set +# CONFIG_ITCO_VENDOR_SUPPORT is not set +CONFIG_ITCO_WDT=y +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_MTD is not set +# CONFIG_NOHIGHMEM is not set +CONFIG_SATA_AHCI=y +# CONFIG_SQUASHFS is not set diff --git a/target/linux/x86/ep80579/target.mk b/target/linux/x86/ep80579/target.mk index 00fe1abc3d..2c75ce7407 100644 --- a/target/linux/x86/ep80579/target.mk +++ b/target/linux/x86/ep80579/target.mk @@ -1,3 +1,4 @@ +LINUX_VERSION:=3.3.6 BOARDNAME:=Intel EP80579 DEFAULT_PACKAGES += kmod-ep80579-can kmod-ep80579-eth kmod-ep80579-misc \ kmod-usb-core kmod-usb2 kmod-usb-hid kmod-usb-uhci