netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/3] s390: bug fixes for net
@ 2012-07-25  8:34 frank.blaschka
  2012-07-25  8:34 ` [patch 1/3] [PATCH] net: wiznet add missing HAS_IOMEM dependency frank.blaschka
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: frank.blaschka @ 2012-07-25  8:34 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [patch 1/3] [PATCH] net: wiznet add missing HAS_IOMEM dependency
  2012-07-25  8:34 [patch 0/3] s390: bug fixes for net frank.blaschka
@ 2012-07-25  8:34 ` frank.blaschka
  2012-07-25  8:34 ` [patch 2/3] [PATCH] netiucv: cleanup attribute usage frank.blaschka
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: frank.blaschka @ 2012-07-25  8:34 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Martin Schwidefsky

[-- Attachment #1: 600-wiznet-kconfig.diff --]
[-- Type: text/plain, Size: 705 bytes --]

The "WIZnet devices" config option should depend on HAS_IOMEM as
all wiznet drivers require it as well.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/net/ethernet/wiznet/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/wiznet/Kconfig b/drivers/net/ethernet/wiznet/Kconfig
index cb18043..b4d2816 100644
--- a/drivers/net/ethernet/wiznet/Kconfig
+++ b/drivers/net/ethernet/wiznet/Kconfig
@@ -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
-- 
1.7.11.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [patch 2/3] [PATCH] netiucv: cleanup attribute usage
  2012-07-25  8:34 [patch 0/3] s390: bug fixes for net frank.blaschka
  2012-07-25  8:34 ` [patch 1/3] [PATCH] net: wiznet add missing HAS_IOMEM dependency frank.blaschka
@ 2012-07-25  8:34 ` frank.blaschka
  2012-07-25  8:34 ` [patch 3/3] [PATCH] qeth: repair crash in qeth_l3_vlan_rx_kill_vid() frank.blaschka
  2012-07-25 22:24 ` [patch 0/3] s390: bug fixes for net David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: frank.blaschka @ 2012-07-25  8:34 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Sebastian Ott, Ursula Braun

[-- Attachment #1: 601-netiucv-attr-usage.diff --]
[-- Type: text/plain, Size: 2312 bytes --]

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.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Acked-by: Ursula Braun <ursula.braun@de.ibm.com>
---
 drivers/s390/net/netiucv.c | 34 ++++++----------------------------
 1 file changed, 6 insertions(+), 28 deletions(-)

diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 8160591..4ffa66c 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -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);
 }
 
-- 
1.7.11.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [patch 3/3] [PATCH] qeth: repair crash in qeth_l3_vlan_rx_kill_vid()
  2012-07-25  8:34 [patch 0/3] s390: bug fixes for net frank.blaschka
  2012-07-25  8:34 ` [patch 1/3] [PATCH] net: wiznet add missing HAS_IOMEM dependency frank.blaschka
  2012-07-25  8:34 ` [patch 2/3] [PATCH] netiucv: cleanup attribute usage frank.blaschka
@ 2012-07-25  8:34 ` frank.blaschka
  2012-07-25 22:24 ` [patch 0/3] s390: bug fixes for net David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: frank.blaschka @ 2012-07-25  8:34 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, stable, Ursula Braun

[-- Attachment #1: 602-qeth-vlan-rx-kill.diff --]
[-- Type: text/plain, Size: 1358 bytes --]

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.

Cc: stable@vger.kernel.org
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/s390/net/qeth_l3_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index f0045ca..d01a617 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -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;
-- 
1.7.11.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch 0/3] s390: bug fixes for net
  2012-07-25  8:34 [patch 0/3] s390: bug fixes for net frank.blaschka
                   ` (2 preceding siblings ...)
  2012-07-25  8:34 ` [patch 3/3] [PATCH] qeth: repair crash in qeth_l3_vlan_rx_kill_vid() frank.blaschka
@ 2012-07-25 22:24 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-07-25 22:24 UTC (permalink / raw)
  To: frank.blaschka; +Cc: netdev, linux-s390

From: frank.blaschka@de.ibm.com
Date: Wed, 25 Jul 2012 10:34:26 +0200

> here are some bug fixes for net.

All applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-25 22:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25  8:34 [patch 0/3] s390: bug fixes for net frank.blaschka
2012-07-25  8:34 ` [patch 1/3] [PATCH] net: wiznet add missing HAS_IOMEM dependency frank.blaschka
2012-07-25  8:34 ` [patch 2/3] [PATCH] netiucv: cleanup attribute usage frank.blaschka
2012-07-25  8:34 ` [patch 3/3] [PATCH] qeth: repair crash in qeth_l3_vlan_rx_kill_vid() frank.blaschka
2012-07-25 22:24 ` [patch 0/3] s390: bug fixes for net David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).