Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -uP makeflags.sh tg3-3.124c/makeflags.sh
- --- makeflags.sh 2012-08-17 17:20:08.000000000 +0200
- +++ tg3-3.124c/makeflags.sh 2013-02-14 22:00:22.049585257 +0100
- @@ -211,10 +211,18 @@
- echo "#define BCM_HAS_ETHTOOL_CMD_SPEED_SET"
- fi
- +if grep -q "ethtool_cmd_speed_set" $srcdir/include/uapi/linux/ethtool.h ; then
- + echo "#define BCM_HAS_ETHTOOL_CMD_SPEED_SET"
- +fi
- +
- if grep -q "ethtool_cmd_speed(" $srcdir/include/linux/ethtool.h ; then
- echo "#define BCM_HAS_ETHTOOL_CMD_SPEED"
- fi
- +if grep -q "ethtool_cmd_speed(" $srcdir/include/uapi/linux/ethtool.h ; then
- + echo "#define BCM_HAS_ETHTOOL_CMD_SPEED"
- +fi
- +
- if grep -q "ETH_TEST_FL_EXTERNAL_LB_DONE" $srcdir/include/linux/ethtool.h ; then
- echo "#define BCM_HAS_EXTERNAL_LB_DONE"
- fi
- diff -uP tg3.c tg3-3.124c/tg3.c
- --- tg3.c 2012-08-17 17:26:49.000000000 +0200
- +++ tg3-3.124c/tg3.c 2013-02-14 22:20:14.365131741 +0100
- @@ -93,7 +93,7 @@
- #include <net/checksum.h>
- #include <net/ip.h>
- -#include <asm/system.h>
- +/*#include <asm/system.h>*/
- #include <asm/io.h>
- #include <asm/byteorder.h>
- #include <asm/uaccess.h>
- @@ -500,6 +500,43 @@
- #define TG3_NUM_TEST ARRAY_SIZE(ethtool_test_keys)
- +static void tg3_irq_quiesce(struct tg3 *tp)
- +{
- +#if (LINUX_VERSION_CODE >= 0x2051c)
- + int i;
- +#endif
- +
- + BUG_ON(tp->irq_sync);
- +
- + tp->irq_sync = 1;
- + smp_mb();
- +
- +#if (LINUX_VERSION_CODE >= 0x2051c)
- + for (i = 0; i < tp->irq_cnt; i++)
- + synchronize_irq(tp->napi[i].irq_vec);
- +#else
- + synchronize_irq();
- +#endif
- +}
- +
- +
- +/* Fully shutdown all tg3 driver activity elsewhere in the system.
- + * If irq_sync is non-zero, then the IRQ handler must be synchronized
- + * with as well. Most of the time, this is not necessary except when
- + * shutting down the device.
- + */
- +static inline void tg3_full_lock(struct tg3 *tp, int irq_sync)
- +{
- + spin_lock_bh(&tp->lock);
- + if (irq_sync)
- + tg3_irq_quiesce(tp);
- +}
- +
- +static inline void tg3_full_unlock(struct tg3 *tp)
- +{
- + spin_unlock_bh(&tp->lock);
- +}
- +
- static void tg3_write32(struct tg3 *tp, u32 off, u32 val)
- {
- @@ -6247,6 +6284,7 @@
- static void tg3_ptp_init(struct tg3 *tp)
- {
- struct timespec now;
- + struct device *dp = &tp->pdev->dev;
- if (!tg3_flag(tp, PTP_CAPABLE))
- return;
- @@ -6261,7 +6299,7 @@
- memcpy(&tp->ptp_info, &tg3_ptp_caps, sizeof(tg3_ptp_caps));
- strncpy(tp->ptp_info.name, tp->dev->name, IFNAMSIZ);
- - tp->ptp_clock = ptp_clock_register(&tp->ptp_info);
- + tp->ptp_clock = ptp_clock_register(&tp->ptp_info, dp);
- if (IS_ERR(tp->ptp_clock))
- tp->ptp_clock = NULL;
- }
- @@ -7552,41 +7590,7 @@
- tg3_enable_ints(tp);
- }
- -static void tg3_irq_quiesce(struct tg3 *tp)
- -{
- -#if (LINUX_VERSION_CODE >= 0x2051c)
- - int i;
- -#endif
- -
- - BUG_ON(tp->irq_sync);
- - tp->irq_sync = 1;
- - smp_mb();
- -
- -#if (LINUX_VERSION_CODE >= 0x2051c)
- - for (i = 0; i < tp->irq_cnt; i++)
- - synchronize_irq(tp->napi[i].irq_vec);
- -#else
- - synchronize_irq();
- -#endif
- -}
- -
- -/* Fully shutdown all tg3 driver activity elsewhere in the system.
- - * If irq_sync is non-zero, then the IRQ handler must be synchronized
- - * with as well. Most of the time, this is not necessary except when
- - * shutting down the device.
- - */
- -static inline void tg3_full_lock(struct tg3 *tp, int irq_sync)
- -{
- - spin_lock_bh(&tp->lock);
- - if (irq_sync)
- - tg3_irq_quiesce(tp);
- -}
- -
- -static inline void tg3_full_unlock(struct tg3 *tp)
- -{
- - spin_unlock_bh(&tp->lock);
- -}
- /* One-shot MSI handler - Chip automatically disables interrupt
- * after sending MSI so driver doesn't have to do it.
- @@ -14531,8 +14535,10 @@
- .set_tso = tg3_set_tso,
- #endif
- #endif /* BCM_HAS_NETDEV_UPDATE_FEATURES */
- +#if (LINUX_VERSION_CODE < 0x30000)
- .get_sg = ethtool_op_get_sg,
- .set_sg = ethtool_op_set_sg,
- +#endif
- #if (LINUX_VERSION_CODE < 0x20618)
- .self_test_count = tg3_get_test_count,
- #endif
- @@ -16497,7 +16503,7 @@
- if (bridge->subordinate &&
- (bridge->subordinate->number <=
- tp->pdev->bus->number) &&
- - (bridge->subordinate->subordinate >=
- + (bridge->subordinate->busn_res.end >=
- tp->pdev->bus->number)) {
- tg3_flag_set(tp, 5701_DMA_BUG);
- pci_dev_put(bridge);
- @@ -16525,7 +16531,7 @@
- if (bridge && bridge->subordinate &&
- (bridge->subordinate->number <=
- tp->pdev->bus->number) &&
- - (bridge->subordinate->subordinate >=
- + (bridge->subordinate->busn_res.end >=
- tp->pdev->bus->number)) {
- tg3_flag_set(tp, 40BIT_DMA_BUG);
- pci_dev_put(bridge);
- @@ -18008,7 +18014,7 @@
- #ifdef BCM_HAS_NEW_INIT_WORK
- INIT_WORK(&tp->reset_task, tg3_reset_task);
- #else
- - INIT_WORK(&tp->reset_task, tg3_reset_task, tp);
- + INIT_WORK(&tp->reset_task, tg3_reset_task);
- #endif
- tp->regs = pci_ioremap_bar(pdev, BAR_0);
- --- tg3_firmware.h 2012-08-17 17:20:08.000000000 +0200
- +++ tg3-3.124c/tg3_firmware.h 2012-11-01 17:06:56.000000000 +0100
- @@ -1,6 +1,6 @@
- /* Copyright (C) 2009-2012 Broadcom Corporation. */
- -#ifdef NETIF_F_TSO
- +#ifdef XXXXNETIF_F_TSO
- #define TG3_TSO_SUPPORT 1
- #else
- #define TG3_TSO_SUPPORT 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement