s390: bug fixes for net
Subsystems (6)
cover s390: bug fixes for net
Hi Dave,
here are some bug fixes for net.
shortlog:
Martin Schwidefsky (1)
net: wiznet add missing HAS_IOMEM dependency
Sebastian Ott (1)
netiucv: cleanup attribute usage
Ursula Braun (1)
qeth: repair crash in qeth_l3_vlan_rx_kill_vid()
Thanks,
Frank
PATCH 1/3 net: wiznet add missing HAS_IOMEM dependency
The "WIZnet devices" config option should depend on HAS_IOMEM as all wiznet drivers require it as well.
--- drivers/net/ethernet/wiznet/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/wiznet/Kconfig +1 -0
@@ -4,6 +4,7 @@ config NET_VENDOR_WIZNET bool "WIZnet devices" + depends on HAS_IOMEM default y ---help--- If you have a network (Ethernet) card belonging to this class, say Y
Signature · 1 line
1.7.11.3
PATCH 2/3 netiucv: cleanup attribute usage
In reply to [email protected]Let the driver core handle device attribute creation and removal. This will simplify the code and eliminates races between attribute availability and userspace notification via uevents.
--- drivers/s390/net/netiucv.c | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-)
drivers/s390/net/netiucv.c +6 -28
@@ -1854,26 +1854,11 @@ static struct attribute_group netiucv_stat_attr_group = { .attrs = netiucv_stat_attrs, }; -static int netiucv_add_files (struct device *dev) -{ -int ret; - -IUCV_DBF_TEXT (trace,3 , __func__); - ret =sysfs_create_group (&dev->kobj, &netiucv_attr_group); -if (ret) -return ret; - ret =sysfs_create_group (&dev->kobj, &netiucv_stat_attr_group); -if (ret) -sysfs_remove_group (&dev->kobj, &netiucv_attr_group); -return ret; -} - -static void netiucv_remove_files (struct device *dev) -{ -IUCV_DBF_TEXT (trace,3 , __func__); -sysfs_remove_group (&dev->kobj, &netiucv_stat_attr_group); -sysfs_remove_group (&dev->kobj, &netiucv_attr_group); -} +static const struct attribute_group *netiucv_attr_groups[] = { + &netiucv_stat_attr_group, + &netiucv_attr_group, +NULL , +};static int netiucv_register_device (struct net_device *ndev) {
@@ -1887,6 +1872,7 @@ static int netiucv_register_device(struct net_device *ndev)dev_set_name (dev,"net%s" , ndev->name); dev->bus = &iucv_bus; dev->parent = iucv_root; + dev->groups = netiucv_attr_groups;/* * The release function could be called after the * module has been unloaded. It's _only_ task is to
@@ -1904,22 +1890,14 @@ static int netiucv_register_device(struct net_device *ndev)put_device (dev);return ret; } - ret =netiucv_add_files (dev); -if (ret) - goto out_unreg; priv->dev = dev;dev_set_drvdata (dev, priv);return 0 ; - -out_unreg: -device_unregister (dev); -return ret; }static void netiucv_unregister_device (struct device *dev) {IUCV_DBF_TEXT (trace,3 , __func__); -netiucv_remove_files (dev);device_unregister (dev); }
Signature · 1 line
1.7.11.3
PATCH 3/3 qeth: repair crash in qeth_l3_vlan_rx_kill_vid()
In reply to [email protected]Commit efc73f4b "net: Fix memory leak - vlan_info struct" adds deletion of VLAN 0 for devices with feature NETIF_F_HW_VLAN_FILTER. For driver qeth these are the layer 3 devices. Usually there exists no separate vlan net_device for VLAN 0. Thus the qeth functions qeth_l3_free_vlan_addresses4() and qeth_l3_free_vlan_addresses6() require an extra checking if function __vlan_find_dev_deep() returns with a net_device.
--- drivers/s390/net/qeth_l3_main.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/s390/net/qeth_l3_main.c +4 -0
@@ -1758,6 +1758,8 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card,QETH_CARD_TEXT (card,4 ,"frvaddr4" ); netdev =__vlan_find_dev_deep (card->dev, vid); +if (!netdev) +return ; in_dev =in_dev_get (netdev);if (!in_dev)return ;
@@ -1786,6 +1788,8 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card,QETH_CARD_TEXT (card,4 ,"frvaddr6" ); netdev =__vlan_find_dev_deep (card->dev, vid); +if (!netdev) +return ; in6_dev =in6_dev_get (netdev);if (!in6_dev)return ;
Signature · 1 line
1.7.11.3
David Miller
maintainerFrom: [email protected]
Date: Wed, 25 Jul 2012 10:34:26 +0200
Quoted 1 line
here are some bug fixes for net.
All applied, thanks.