diff options
author | David S. Miller <davem@davemloft.net> | 2013-03-07 15:52:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-07 15:52:33 -0500 |
commit | c5b156794736142fa3120d488f260ff26da3d134 (patch) | |
tree | aea8161b5ec5c7f9ffa6aa6e001f5a3f5ac32603 | |
parent | 43b18db8a27fcd28c2bd290adf031ca04ea573ce (diff) | |
parent | a229e488ac3f904d06c20d8d3f47831db3c7a15a (diff) |
Merge branch 'mlx4'
Or Gerlitz says:
====================
Here's a batch of fixes to the mlx4 core and ethernet drivers for 3.9
The commit that disabled RFS when running in SRIOV mode fixes a regression which was
introduced in 3.9-rc1 but actually present also in the 3.8 -stable series. It turns out
that a slightly different fix is needed there and we will generate and submit it there.
Patches done against net commit 66d29cbc59433 "benet: Wait f/w POST until timeout"
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/cq.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 86 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mr.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/pd.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/port.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/qp.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/srq.c | 2 |
12 files changed, 75 insertions, 59 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c b/drivers/net/ethernet/mellanox/mlx4/cq.c index 7e64033d7de3..0706623cfb96 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cq.c +++ b/drivers/net/ethernet/mellanox/mlx4/cq.c | |||
@@ -226,7 +226,7 @@ void __mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn) | |||
226 | 226 | ||
227 | static void mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn) | 227 | static void mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn) |
228 | { | 228 | { |
229 | u64 in_param; | 229 | u64 in_param = 0; |
230 | int err; | 230 | int err; |
231 | 231 | ||
232 | if (mlx4_is_mfunc(dev)) { | 232 | if (mlx4_is_mfunc(dev)) { |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index bb4d8d99f36d..995d4b6d5c1e 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -565,34 +565,38 @@ static void mlx4_en_put_qp(struct mlx4_en_priv *priv) | |||
565 | struct mlx4_en_dev *mdev = priv->mdev; | 565 | struct mlx4_en_dev *mdev = priv->mdev; |
566 | struct mlx4_dev *dev = mdev->dev; | 566 | struct mlx4_dev *dev = mdev->dev; |
567 | int qpn = priv->base_qpn; | 567 | int qpn = priv->base_qpn; |
568 | u64 mac = mlx4_en_mac_to_u64(priv->dev->dev_addr); | 568 | u64 mac; |
569 | |||
570 | en_dbg(DRV, priv, "Registering MAC: %pM for deleting\n", | ||
571 | priv->dev->dev_addr); | ||
572 | mlx4_unregister_mac(dev, priv->port, mac); | ||
573 | 569 | ||
574 | if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0) { | 570 | if (dev->caps.steering_mode == MLX4_STEERING_MODE_A0) { |
571 | mac = mlx4_en_mac_to_u64(priv->dev->dev_addr); | ||
572 | en_dbg(DRV, priv, "Registering MAC: %pM for deleting\n", | ||
573 | priv->dev->dev_addr); | ||
574 | mlx4_unregister_mac(dev, priv->port, mac); | ||
575 | } else { | ||
575 | struct mlx4_mac_entry *entry; | 576 | struct mlx4_mac_entry *entry; |
576 | struct hlist_node *tmp; | 577 | struct hlist_node *tmp; |
577 | struct hlist_head *bucket; | 578 | struct hlist_head *bucket; |
578 | unsigned int mac_hash; | 579 | unsigned int i; |
579 | 580 | ||
580 | mac_hash = priv->dev->dev_addr[MLX4_EN_MAC_HASH_IDX]; | 581 | for (i = 0; i < MLX4_EN_MAC_HASH_SIZE; ++i) { |
581 | bucket = &priv->mac_hash[mac_hash]; | 582 | bucket = &priv->mac_hash[i]; |
582 | hlist_for_each_entry_safe(entry, tmp, bucket, hlist) { | 583 | hlist_for_each_entry_safe(entry, tmp, bucket, hlist) { |
583 | if (ether_addr_equal_64bits(entry->mac, | 584 | mac = mlx4_en_mac_to_u64(entry->mac); |
584 | priv->dev->dev_addr)) { | 585 | en_dbg(DRV, priv, "Registering MAC: %pM for deleting\n", |
585 | en_dbg(DRV, priv, "Releasing qp: port %d, MAC %pM, qpn %d\n", | 586 | entry->mac); |
586 | priv->port, priv->dev->dev_addr, qpn); | ||
587 | mlx4_en_uc_steer_release(priv, entry->mac, | 587 | mlx4_en_uc_steer_release(priv, entry->mac, |
588 | qpn, entry->reg_id); | 588 | qpn, entry->reg_id); |
589 | mlx4_qp_release_range(dev, qpn, 1); | ||
590 | 589 | ||
590 | mlx4_unregister_mac(dev, priv->port, mac); | ||
591 | hlist_del_rcu(&entry->hlist); | 591 | hlist_del_rcu(&entry->hlist); |
592 | kfree_rcu(entry, rcu); | 592 | kfree_rcu(entry, rcu); |
593 | break; | ||
594 | } | 593 | } |
595 | } | 594 | } |
595 | |||
596 | en_dbg(DRV, priv, "Releasing qp: port %d, qpn %d\n", | ||
597 | priv->port, qpn); | ||
598 | mlx4_qp_release_range(dev, qpn, 1); | ||
599 | priv->flags &= ~MLX4_EN_FLAG_FORCE_PROMISC; | ||
596 | } | 600 | } |
597 | } | 601 | } |
598 | 602 | ||
@@ -650,28 +654,10 @@ u64 mlx4_en_mac_to_u64(u8 *addr) | |||
650 | return mac; | 654 | return mac; |
651 | } | 655 | } |
652 | 656 | ||
653 | static int mlx4_en_set_mac(struct net_device *dev, void *addr) | 657 | static int mlx4_en_do_set_mac(struct mlx4_en_priv *priv) |
654 | { | ||
655 | struct mlx4_en_priv *priv = netdev_priv(dev); | ||
656 | struct mlx4_en_dev *mdev = priv->mdev; | ||
657 | struct sockaddr *saddr = addr; | ||
658 | |||
659 | if (!is_valid_ether_addr(saddr->sa_data)) | ||
660 | return -EADDRNOTAVAIL; | ||
661 | |||
662 | memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN); | ||
663 | queue_work(mdev->workqueue, &priv->mac_task); | ||
664 | return 0; | ||
665 | } | ||
666 | |||
667 | static void mlx4_en_do_set_mac(struct work_struct *work) | ||
668 | { | 658 | { |
669 | struct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv, | ||
670 | mac_task); | ||
671 | struct mlx4_en_dev *mdev = priv->mdev; | ||
672 | int err = 0; | 659 | int err = 0; |
673 | 660 | ||
674 | mutex_lock(&mdev->state_lock); | ||
675 | if (priv->port_up) { | 661 | if (priv->port_up) { |
676 | /* Remove old MAC and insert the new one */ | 662 | /* Remove old MAC and insert the new one */ |
677 | err = mlx4_en_replace_mac(priv, priv->base_qpn, | 663 | err = mlx4_en_replace_mac(priv, priv->base_qpn, |
@@ -683,7 +669,26 @@ static void mlx4_en_do_set_mac(struct work_struct *work) | |||
683 | } else | 669 | } else |
684 | en_dbg(HW, priv, "Port is down while registering mac, exiting...\n"); | 670 | en_dbg(HW, priv, "Port is down while registering mac, exiting...\n"); |
685 | 671 | ||
672 | return err; | ||
673 | } | ||
674 | |||
675 | static int mlx4_en_set_mac(struct net_device *dev, void *addr) | ||
676 | { | ||
677 | struct mlx4_en_priv *priv = netdev_priv(dev); | ||
678 | struct mlx4_en_dev *mdev = priv->mdev; | ||
679 | struct sockaddr *saddr = addr; | ||
680 | int err; | ||
681 | |||
682 | if (!is_valid_ether_addr(saddr->sa_data)) | ||
683 | return -EADDRNOTAVAIL; | ||
684 | |||
685 | memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN); | ||
686 | |||
687 | mutex_lock(&mdev->state_lock); | ||
688 | err = mlx4_en_do_set_mac(priv); | ||
686 | mutex_unlock(&mdev->state_lock); | 689 | mutex_unlock(&mdev->state_lock); |
690 | |||
691 | return err; | ||
687 | } | 692 | } |
688 | 693 | ||
689 | static void mlx4_en_clear_list(struct net_device *dev) | 694 | static void mlx4_en_clear_list(struct net_device *dev) |
@@ -1348,7 +1353,7 @@ static void mlx4_en_do_get_stats(struct work_struct *work) | |||
1348 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); | 1353 | queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); |
1349 | } | 1354 | } |
1350 | if (mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port]) { | 1355 | if (mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port]) { |
1351 | queue_work(mdev->workqueue, &priv->mac_task); | 1356 | mlx4_en_do_set_mac(priv); |
1352 | mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port] = 0; | 1357 | mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port] = 0; |
1353 | } | 1358 | } |
1354 | mutex_unlock(&mdev->state_lock); | 1359 | mutex_unlock(&mdev->state_lock); |
@@ -1828,9 +1833,11 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) | |||
1828 | } | 1833 | } |
1829 | 1834 | ||
1830 | #ifdef CONFIG_RFS_ACCEL | 1835 | #ifdef CONFIG_RFS_ACCEL |
1831 | priv->dev->rx_cpu_rmap = alloc_irq_cpu_rmap(priv->mdev->dev->caps.comp_pool); | 1836 | if (priv->mdev->dev->caps.comp_pool) { |
1832 | if (!priv->dev->rx_cpu_rmap) | 1837 | priv->dev->rx_cpu_rmap = alloc_irq_cpu_rmap(priv->mdev->dev->caps.comp_pool); |
1833 | goto err; | 1838 | if (!priv->dev->rx_cpu_rmap) |
1839 | goto err; | ||
1840 | } | ||
1834 | #endif | 1841 | #endif |
1835 | 1842 | ||
1836 | return 0; | 1843 | return 0; |
@@ -2078,7 +2085,6 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | |||
2078 | priv->msg_enable = MLX4_EN_MSG_LEVEL; | 2085 | priv->msg_enable = MLX4_EN_MSG_LEVEL; |
2079 | spin_lock_init(&priv->stats_lock); | 2086 | spin_lock_init(&priv->stats_lock); |
2080 | INIT_WORK(&priv->rx_mode_task, mlx4_en_do_set_rx_mode); | 2087 | INIT_WORK(&priv->rx_mode_task, mlx4_en_do_set_rx_mode); |
2081 | INIT_WORK(&priv->mac_task, mlx4_en_do_set_mac); | ||
2082 | INIT_WORK(&priv->watchdog_task, mlx4_en_restart); | 2088 | INIT_WORK(&priv->watchdog_task, mlx4_en_restart); |
2083 | INIT_WORK(&priv->linkstate_task, mlx4_en_linkstate); | 2089 | INIT_WORK(&priv->linkstate_task, mlx4_en_linkstate); |
2084 | INIT_DELAYED_WORK(&priv->stats_task, mlx4_en_do_get_stats); | 2090 | INIT_DELAYED_WORK(&priv->stats_task, mlx4_en_do_get_stats); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 50917eb3013e..f6245579962d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c | |||
@@ -787,6 +787,14 @@ int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave, | |||
787 | bmme_flags &= ~MLX4_BMME_FLAG_TYPE_2_WIN; | 787 | bmme_flags &= ~MLX4_BMME_FLAG_TYPE_2_WIN; |
788 | MLX4_PUT(outbox->buf, bmme_flags, QUERY_DEV_CAP_BMME_FLAGS_OFFSET); | 788 | MLX4_PUT(outbox->buf, bmme_flags, QUERY_DEV_CAP_BMME_FLAGS_OFFSET); |
789 | 789 | ||
790 | /* turn off device-managed steering capability if not enabled */ | ||
791 | if (dev->caps.steering_mode != MLX4_STEERING_MODE_DEVICE_MANAGED) { | ||
792 | MLX4_GET(field, outbox->buf, | ||
793 | QUERY_DEV_CAP_FLOW_STEERING_RANGE_EN_OFFSET); | ||
794 | field &= 0x7f; | ||
795 | MLX4_PUT(outbox->buf, field, | ||
796 | QUERY_DEV_CAP_FLOW_STEERING_RANGE_EN_OFFSET); | ||
797 | } | ||
790 | return 0; | 798 | return 0; |
791 | } | 799 | } |
792 | 800 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index d180bc46826a..16abde20e1fc 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -1555,7 +1555,7 @@ void __mlx4_counter_free(struct mlx4_dev *dev, u32 idx) | |||
1555 | 1555 | ||
1556 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx) | 1556 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx) |
1557 | { | 1557 | { |
1558 | u64 in_param; | 1558 | u64 in_param = 0; |
1559 | 1559 | ||
1560 | if (mlx4_is_mfunc(dev)) { | 1560 | if (mlx4_is_mfunc(dev)) { |
1561 | set_param_l(&in_param, idx); | 1561 | set_param_l(&in_param, idx); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index cf883345af88..d738454116a0 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h | |||
@@ -1235,7 +1235,7 @@ int mlx4_get_qp_per_mgm(struct mlx4_dev *dev); | |||
1235 | 1235 | ||
1236 | static inline void set_param_l(u64 *arg, u32 val) | 1236 | static inline void set_param_l(u64 *arg, u32 val) |
1237 | { | 1237 | { |
1238 | *((u32 *)arg) = val; | 1238 | *arg = (*arg & 0xffffffff00000000ULL) | (u64) val; |
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | static inline void set_param_h(u64 *arg, u32 val) | 1241 | static inline void set_param_h(u64 *arg, u32 val) |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h index c313d7e943a9..f710b7ce0dcb 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | |||
@@ -509,7 +509,6 @@ struct mlx4_en_priv { | |||
509 | struct mlx4_en_cq rx_cq[MAX_RX_RINGS]; | 509 | struct mlx4_en_cq rx_cq[MAX_RX_RINGS]; |
510 | struct mlx4_qp drop_qp; | 510 | struct mlx4_qp drop_qp; |
511 | struct work_struct rx_mode_task; | 511 | struct work_struct rx_mode_task; |
512 | struct work_struct mac_task; | ||
513 | struct work_struct watchdog_task; | 512 | struct work_struct watchdog_task; |
514 | struct work_struct linkstate_task; | 513 | struct work_struct linkstate_task; |
515 | struct delayed_work stats_task; | 514 | struct delayed_work stats_task; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c index 602ca9bf78e4..f91719a08cba 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c | |||
@@ -183,7 +183,7 @@ u32 __mlx4_alloc_mtt_range(struct mlx4_dev *dev, int order) | |||
183 | 183 | ||
184 | static u32 mlx4_alloc_mtt_range(struct mlx4_dev *dev, int order) | 184 | static u32 mlx4_alloc_mtt_range(struct mlx4_dev *dev, int order) |
185 | { | 185 | { |
186 | u64 in_param; | 186 | u64 in_param = 0; |
187 | u64 out_param; | 187 | u64 out_param; |
188 | int err; | 188 | int err; |
189 | 189 | ||
@@ -240,7 +240,7 @@ void __mlx4_free_mtt_range(struct mlx4_dev *dev, u32 offset, int order) | |||
240 | 240 | ||
241 | static void mlx4_free_mtt_range(struct mlx4_dev *dev, u32 offset, int order) | 241 | static void mlx4_free_mtt_range(struct mlx4_dev *dev, u32 offset, int order) |
242 | { | 242 | { |
243 | u64 in_param; | 243 | u64 in_param = 0; |
244 | int err; | 244 | int err; |
245 | 245 | ||
246 | if (mlx4_is_mfunc(dev)) { | 246 | if (mlx4_is_mfunc(dev)) { |
@@ -351,7 +351,7 @@ void __mlx4_mpt_release(struct mlx4_dev *dev, u32 index) | |||
351 | 351 | ||
352 | static void mlx4_mpt_release(struct mlx4_dev *dev, u32 index) | 352 | static void mlx4_mpt_release(struct mlx4_dev *dev, u32 index) |
353 | { | 353 | { |
354 | u64 in_param; | 354 | u64 in_param = 0; |
355 | 355 | ||
356 | if (mlx4_is_mfunc(dev)) { | 356 | if (mlx4_is_mfunc(dev)) { |
357 | set_param_l(&in_param, index); | 357 | set_param_l(&in_param, index); |
@@ -374,7 +374,7 @@ int __mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index) | |||
374 | 374 | ||
375 | static int mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index) | 375 | static int mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index) |
376 | { | 376 | { |
377 | u64 param; | 377 | u64 param = 0; |
378 | 378 | ||
379 | if (mlx4_is_mfunc(dev)) { | 379 | if (mlx4_is_mfunc(dev)) { |
380 | set_param_l(¶m, index); | 380 | set_param_l(¶m, index); |
@@ -395,7 +395,7 @@ void __mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index) | |||
395 | 395 | ||
396 | static void mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index) | 396 | static void mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index) |
397 | { | 397 | { |
398 | u64 in_param; | 398 | u64 in_param = 0; |
399 | 399 | ||
400 | if (mlx4_is_mfunc(dev)) { | 400 | if (mlx4_is_mfunc(dev)) { |
401 | set_param_l(&in_param, index); | 401 | set_param_l(&in_param, index); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/pd.c b/drivers/net/ethernet/mellanox/mlx4/pd.c index 1ac88637ad9d..00f223acada7 100644 --- a/drivers/net/ethernet/mellanox/mlx4/pd.c +++ b/drivers/net/ethernet/mellanox/mlx4/pd.c | |||
@@ -101,7 +101,7 @@ void __mlx4_xrcd_free(struct mlx4_dev *dev, u32 xrcdn) | |||
101 | 101 | ||
102 | void mlx4_xrcd_free(struct mlx4_dev *dev, u32 xrcdn) | 102 | void mlx4_xrcd_free(struct mlx4_dev *dev, u32 xrcdn) |
103 | { | 103 | { |
104 | u64 in_param; | 104 | u64 in_param = 0; |
105 | int err; | 105 | int err; |
106 | 106 | ||
107 | if (mlx4_is_mfunc(dev)) { | 107 | if (mlx4_is_mfunc(dev)) { |
diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c index 719ead15e491..10c57c86388b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/port.c +++ b/drivers/net/ethernet/mellanox/mlx4/port.c | |||
@@ -175,7 +175,7 @@ EXPORT_SYMBOL_GPL(__mlx4_register_mac); | |||
175 | 175 | ||
176 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac) | 176 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac) |
177 | { | 177 | { |
178 | u64 out_param; | 178 | u64 out_param = 0; |
179 | int err; | 179 | int err; |
180 | 180 | ||
181 | if (mlx4_is_mfunc(dev)) { | 181 | if (mlx4_is_mfunc(dev)) { |
@@ -222,7 +222,7 @@ EXPORT_SYMBOL_GPL(__mlx4_unregister_mac); | |||
222 | 222 | ||
223 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac) | 223 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac) |
224 | { | 224 | { |
225 | u64 out_param; | 225 | u64 out_param = 0; |
226 | 226 | ||
227 | if (mlx4_is_mfunc(dev)) { | 227 | if (mlx4_is_mfunc(dev)) { |
228 | set_param_l(&out_param, port); | 228 | set_param_l(&out_param, port); |
@@ -361,7 +361,7 @@ out: | |||
361 | 361 | ||
362 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index) | 362 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index) |
363 | { | 363 | { |
364 | u64 out_param; | 364 | u64 out_param = 0; |
365 | int err; | 365 | int err; |
366 | 366 | ||
367 | if (mlx4_is_mfunc(dev)) { | 367 | if (mlx4_is_mfunc(dev)) { |
@@ -406,7 +406,7 @@ out: | |||
406 | 406 | ||
407 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index) | 407 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index) |
408 | { | 408 | { |
409 | u64 in_param; | 409 | u64 in_param = 0; |
410 | int err; | 410 | int err; |
411 | 411 | ||
412 | if (mlx4_is_mfunc(dev)) { | 412 | if (mlx4_is_mfunc(dev)) { |
diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c index 81e2abe07bbb..e891b058c1be 100644 --- a/drivers/net/ethernet/mellanox/mlx4/qp.c +++ b/drivers/net/ethernet/mellanox/mlx4/qp.c | |||
@@ -222,7 +222,7 @@ int __mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, | |||
222 | 222 | ||
223 | int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base) | 223 | int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base) |
224 | { | 224 | { |
225 | u64 in_param; | 225 | u64 in_param = 0; |
226 | u64 out_param; | 226 | u64 out_param; |
227 | int err; | 227 | int err; |
228 | 228 | ||
@@ -255,7 +255,7 @@ void __mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt) | |||
255 | 255 | ||
256 | void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt) | 256 | void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt) |
257 | { | 257 | { |
258 | u64 in_param; | 258 | u64 in_param = 0; |
259 | int err; | 259 | int err; |
260 | 260 | ||
261 | if (mlx4_is_mfunc(dev)) { | 261 | if (mlx4_is_mfunc(dev)) { |
@@ -319,7 +319,7 @@ err_out: | |||
319 | 319 | ||
320 | static int mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn) | 320 | static int mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn) |
321 | { | 321 | { |
322 | u64 param; | 322 | u64 param = 0; |
323 | 323 | ||
324 | if (mlx4_is_mfunc(dev)) { | 324 | if (mlx4_is_mfunc(dev)) { |
325 | set_param_l(¶m, qpn); | 325 | set_param_l(¶m, qpn); |
@@ -344,7 +344,7 @@ void __mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn) | |||
344 | 344 | ||
345 | static void mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn) | 345 | static void mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn) |
346 | { | 346 | { |
347 | u64 in_param; | 347 | u64 in_param = 0; |
348 | 348 | ||
349 | if (mlx4_is_mfunc(dev)) { | 349 | if (mlx4_is_mfunc(dev)) { |
350 | set_param_l(&in_param, qpn); | 350 | set_param_l(&in_param, qpn); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 083fb48dc3d7..2995687f1aee 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | |||
@@ -2990,6 +2990,9 @@ int mlx4_QP_ATTACH_wrapper(struct mlx4_dev *dev, int slave, | |||
2990 | u8 steer_type_mask = 2; | 2990 | u8 steer_type_mask = 2; |
2991 | enum mlx4_steer_type type = (gid[7] & steer_type_mask) >> 1; | 2991 | enum mlx4_steer_type type = (gid[7] & steer_type_mask) >> 1; |
2992 | 2992 | ||
2993 | if (dev->caps.steering_mode != MLX4_STEERING_MODE_B0) | ||
2994 | return -EINVAL; | ||
2995 | |||
2993 | qpn = vhcr->in_modifier & 0xffffff; | 2996 | qpn = vhcr->in_modifier & 0xffffff; |
2994 | err = get_res(dev, slave, qpn, RES_QP, &rqp); | 2997 | err = get_res(dev, slave, qpn, RES_QP, &rqp); |
2995 | if (err) | 2998 | if (err) |
diff --git a/drivers/net/ethernet/mellanox/mlx4/srq.c b/drivers/net/ethernet/mellanox/mlx4/srq.c index feda6c00829f..e329fe1f11b7 100644 --- a/drivers/net/ethernet/mellanox/mlx4/srq.c +++ b/drivers/net/ethernet/mellanox/mlx4/srq.c | |||
@@ -149,7 +149,7 @@ void __mlx4_srq_free_icm(struct mlx4_dev *dev, int srqn) | |||
149 | 149 | ||
150 | static void mlx4_srq_free_icm(struct mlx4_dev *dev, int srqn) | 150 | static void mlx4_srq_free_icm(struct mlx4_dev *dev, int srqn) |
151 | { | 151 | { |
152 | u64 in_param; | 152 | u64 in_param = 0; |
153 | 153 | ||
154 | if (mlx4_is_mfunc(dev)) { | 154 | if (mlx4_is_mfunc(dev)) { |
155 | set_param_l(&in_param, srqn); | 155 | set_param_l(&in_param, srqn); |