diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 19 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 21 |
2 files changed, 19 insertions, 21 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 638a57f4d8a1..029a7acf7b7a 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -5444,17 +5444,14 @@ void qeth_core_get_drvinfo(struct net_device *dev, | |||
5444 | struct ethtool_drvinfo *info) | 5444 | struct ethtool_drvinfo *info) |
5445 | { | 5445 | { |
5446 | struct qeth_card *card = dev->ml_priv; | 5446 | struct qeth_card *card = dev->ml_priv; |
5447 | if (card->options.layer2) | 5447 | |
5448 | strcpy(info->driver, "qeth_l2"); | 5448 | strlcpy(info->driver, card->options.layer2 ? "qeth_l2" : "qeth_l3", |
5449 | else | 5449 | sizeof(info->driver)); |
5450 | strcpy(info->driver, "qeth_l3"); | 5450 | strlcpy(info->version, "1.0", sizeof(info->version)); |
5451 | 5451 | strlcpy(info->fw_version, card->info.mcl_level, | |
5452 | strcpy(info->version, "1.0"); | 5452 | sizeof(info->fw_version)); |
5453 | strcpy(info->fw_version, card->info.mcl_level); | 5453 | snprintf(info->bus_info, sizeof(info->bus_info), "%s/%s/%s", |
5454 | sprintf(info->bus_info, "%s/%s/%s", | 5454 | CARD_RDEV_ID(card), CARD_WDEV_ID(card), CARD_DDEV_ID(card)); |
5455 | CARD_RDEV_ID(card), | ||
5456 | CARD_WDEV_ID(card), | ||
5457 | CARD_DDEV_ID(card)); | ||
5458 | } | 5455 | } |
5459 | EXPORT_SYMBOL_GPL(qeth_core_get_drvinfo); | 5456 | EXPORT_SYMBOL_GPL(qeth_core_get_drvinfo); |
5460 | 5457 | ||
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 6e5eef01e667..0749efe1c6d9 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1640,6 +1640,7 @@ static void qeth_l3_add_mc(struct qeth_card *card, struct in_device *in4_dev) | |||
1640 | } | 1640 | } |
1641 | } | 1641 | } |
1642 | 1642 | ||
1643 | /* called with rcu_read_lock */ | ||
1643 | static void qeth_l3_add_vlan_mc(struct qeth_card *card) | 1644 | static void qeth_l3_add_vlan_mc(struct qeth_card *card) |
1644 | { | 1645 | { |
1645 | struct in_device *in_dev; | 1646 | struct in_device *in_dev; |
@@ -1652,19 +1653,14 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card) | |||
1652 | for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) { | 1653 | for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) { |
1653 | struct net_device *netdev; | 1654 | struct net_device *netdev; |
1654 | 1655 | ||
1655 | rcu_read_lock(); | ||
1656 | netdev = __vlan_find_dev_deep(card->dev, vid); | 1656 | netdev = __vlan_find_dev_deep(card->dev, vid); |
1657 | rcu_read_unlock(); | ||
1658 | if (netdev == NULL || | 1657 | if (netdev == NULL || |
1659 | !(netdev->flags & IFF_UP)) | 1658 | !(netdev->flags & IFF_UP)) |
1660 | continue; | 1659 | continue; |
1661 | in_dev = in_dev_get(netdev); | 1660 | in_dev = __in_dev_get_rcu(netdev); |
1662 | if (!in_dev) | 1661 | if (!in_dev) |
1663 | continue; | 1662 | continue; |
1664 | rcu_read_lock(); | ||
1665 | qeth_l3_add_mc(card, in_dev); | 1663 | qeth_l3_add_mc(card, in_dev); |
1666 | rcu_read_unlock(); | ||
1667 | in_dev_put(in_dev); | ||
1668 | } | 1664 | } |
1669 | } | 1665 | } |
1670 | 1666 | ||
@@ -1673,14 +1669,14 @@ static void qeth_l3_add_multicast_ipv4(struct qeth_card *card) | |||
1673 | struct in_device *in4_dev; | 1669 | struct in_device *in4_dev; |
1674 | 1670 | ||
1675 | QETH_CARD_TEXT(card, 4, "chkmcv4"); | 1671 | QETH_CARD_TEXT(card, 4, "chkmcv4"); |
1676 | in4_dev = in_dev_get(card->dev); | ||
1677 | if (in4_dev == NULL) | ||
1678 | return; | ||
1679 | rcu_read_lock(); | 1672 | rcu_read_lock(); |
1673 | in4_dev = __in_dev_get_rcu(card->dev); | ||
1674 | if (in4_dev == NULL) | ||
1675 | goto unlock; | ||
1680 | qeth_l3_add_mc(card, in4_dev); | 1676 | qeth_l3_add_mc(card, in4_dev); |
1681 | qeth_l3_add_vlan_mc(card); | 1677 | qeth_l3_add_vlan_mc(card); |
1678 | unlock: | ||
1682 | rcu_read_unlock(); | 1679 | rcu_read_unlock(); |
1683 | in_dev_put(in4_dev); | ||
1684 | } | 1680 | } |
1685 | 1681 | ||
1686 | #ifdef CONFIG_QETH_IPV6 | 1682 | #ifdef CONFIG_QETH_IPV6 |
@@ -1705,6 +1701,7 @@ static void qeth_l3_add_mc6(struct qeth_card *card, struct inet6_dev *in6_dev) | |||
1705 | } | 1701 | } |
1706 | } | 1702 | } |
1707 | 1703 | ||
1704 | /* called with rcu_read_lock */ | ||
1708 | static void qeth_l3_add_vlan_mc6(struct qeth_card *card) | 1705 | static void qeth_l3_add_vlan_mc6(struct qeth_card *card) |
1709 | { | 1706 | { |
1710 | struct inet6_dev *in_dev; | 1707 | struct inet6_dev *in_dev; |
@@ -1741,10 +1738,12 @@ static void qeth_l3_add_multicast_ipv6(struct qeth_card *card) | |||
1741 | in6_dev = in6_dev_get(card->dev); | 1738 | in6_dev = in6_dev_get(card->dev); |
1742 | if (in6_dev == NULL) | 1739 | if (in6_dev == NULL) |
1743 | return; | 1740 | return; |
1741 | rcu_read_lock(); | ||
1744 | read_lock_bh(&in6_dev->lock); | 1742 | read_lock_bh(&in6_dev->lock); |
1745 | qeth_l3_add_mc6(card, in6_dev); | 1743 | qeth_l3_add_mc6(card, in6_dev); |
1746 | qeth_l3_add_vlan_mc6(card); | 1744 | qeth_l3_add_vlan_mc6(card); |
1747 | read_unlock_bh(&in6_dev->lock); | 1745 | read_unlock_bh(&in6_dev->lock); |
1746 | rcu_read_unlock(); | ||
1748 | in6_dev_put(in6_dev); | 1747 | in6_dev_put(in6_dev); |
1749 | } | 1748 | } |
1750 | #endif /* CONFIG_QETH_IPV6 */ | 1749 | #endif /* CONFIG_QETH_IPV6 */ |
@@ -1813,8 +1812,10 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card, | |||
1813 | static void qeth_l3_free_vlan_addresses(struct qeth_card *card, | 1812 | static void qeth_l3_free_vlan_addresses(struct qeth_card *card, |
1814 | unsigned short vid) | 1813 | unsigned short vid) |
1815 | { | 1814 | { |
1815 | rcu_read_lock(); | ||
1816 | qeth_l3_free_vlan_addresses4(card, vid); | 1816 | qeth_l3_free_vlan_addresses4(card, vid); |
1817 | qeth_l3_free_vlan_addresses6(card, vid); | 1817 | qeth_l3_free_vlan_addresses6(card, vid); |
1818 | rcu_read_unlock(); | ||
1818 | } | 1819 | } |
1819 | 1820 | ||
1820 | static int qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | 1821 | static int qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) |