* [patch 0/4] s390: qeth patches for net-next
@ 2010-11-26 12:41 frank.blaschka
2010-11-26 12:41 ` [patch 1/4] [PATCH] qeth lcs: convert mc rwlock to RCU frank.blaschka
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: frank.blaschka @ 2010-11-26 12:41 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390
Hi Dave,
here are some patches for net-next.
The set contains also the patch from Sachin Sant to fix the s390 build.
shortlog:
Ursula Braun (1)
qeth: enable interface setup if LAN is offline
Joe Perches (1)
drivers/s390/net: Remove unnecessary semicolons
Sachin Sant (1)
qeth lcs: convert mc rwlock to RCU
Frank Blaschka (1)
qeth: l3 fix len in tso hdr
Thanks,
Frank
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 1/4] [PATCH] qeth lcs: convert mc rwlock to RCU
2010-11-26 12:41 [patch 0/4] s390: qeth patches for net-next frank.blaschka
@ 2010-11-26 12:41 ` frank.blaschka
2010-11-26 12:41 ` [patch 2/4] [PATCH] drivers/s390/net: Remove unnecessary semicolons frank.blaschka
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: frank.blaschka @ 2010-11-26 12:41 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Sachin Sant, Ursula Braun
[-- Attachment #1: qeth_lcs_mc_lock.patch --]
[-- Type: text/plain, Size: 3118 bytes --]
From: Sachin Sant <sachinp@in.ibm.com>
Commit 1d7138de878d1d4210727c1200193e69596f93b3
igmp: RCU conversion of in_dev->mc_list
converted rwlock to RCU.
Update the s390 network drivers(qeth & lcs) code to adapt to this change.
V2 : Changes based on suggestions given by Eric Dumazet
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/lcs.c | 10 ++++++----
drivers/s390/net/qeth_l3_main.c | 11 ++++++-----
2 files changed, 12 insertions(+), 9 deletions(-)
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -1188,7 +1188,8 @@ lcs_remove_mc_addresses(struct lcs_card
spin_lock_irqsave(&card->ipm_lock, flags);
list_for_each(l, &card->ipm_list) {
ipm = list_entry(l, struct lcs_ipm_list, list);
- for (im4 = in4_dev->mc_list; im4 != NULL; im4 = im4->next) {
+ for (im4 = rcu_dereference(in4_dev->mc_list);
+ im4 != NULL; im4 = rcu_dereference(im4->next_rcu)) {
lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev);
if ( (ipm->ipm.ip_addr == im4->multiaddr) &&
(memcmp(buf, &ipm->ipm.mac_addr,
@@ -1233,7 +1234,8 @@ lcs_set_mc_addresses(struct lcs_card *ca
unsigned long flags;
LCS_DBF_TEXT(4, trace, "setmclst");
- for (im4 = in4_dev->mc_list; im4; im4 = im4->next) {
+ for (im4 = rcu_dereference(in4_dev->mc_list); im4 != NULL;
+ im4 = rcu_dereference(im4->next_rcu)) {
lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev);
ipm = lcs_check_addr_entry(card, im4, buf);
if (ipm != NULL)
@@ -1269,10 +1271,10 @@ lcs_register_mc_addresses(void *data)
in4_dev = in_dev_get(card->dev);
if (in4_dev == NULL)
goto out;
- read_lock(&in4_dev->mc_list_lock);
+ rcu_read_lock();
lcs_remove_mc_addresses(card,in4_dev);
lcs_set_mc_addresses(card, in4_dev);
- read_unlock(&in4_dev->mc_list_lock);
+ rcu_read_unlock();
in_dev_put(in4_dev);
netif_carrier_off(card->dev);
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1796,7 +1796,8 @@ static void qeth_l3_add_mc(struct qeth_c
char buf[MAX_ADDR_LEN];
QETH_CARD_TEXT(card, 4, "addmc");
- for (im4 = in4_dev->mc_list; im4; im4 = im4->next) {
+ for (im4 = rcu_dereference(in4_dev->mc_list); im4 != NULL;
+ im4 = rcu_dereference(im4->next_rcu)) {
qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev);
ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4);
if (!ipm)
@@ -1828,9 +1829,9 @@ static void qeth_l3_add_vlan_mc(struct q
in_dev = in_dev_get(netdev);
if (!in_dev)
continue;
- read_lock(&in_dev->mc_list_lock);
+ rcu_read_lock();
qeth_l3_add_mc(card, in_dev);
- read_unlock(&in_dev->mc_list_lock);
+ rcu_read_unlock();
in_dev_put(in_dev);
}
}
@@ -1843,10 +1844,10 @@ static void qeth_l3_add_multicast_ipv4(s
in4_dev = in_dev_get(card->dev);
if (in4_dev == NULL)
return;
- read_lock(&in4_dev->mc_list_lock);
+ rcu_read_lock();
qeth_l3_add_mc(card, in4_dev);
qeth_l3_add_vlan_mc(card);
- read_unlock(&in4_dev->mc_list_lock);
+ rcu_read_unlock();
in_dev_put(in4_dev);
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 2/4] [PATCH] drivers/s390/net: Remove unnecessary semicolons
2010-11-26 12:41 [patch 0/4] s390: qeth patches for net-next frank.blaschka
2010-11-26 12:41 ` [patch 1/4] [PATCH] qeth lcs: convert mc rwlock to RCU frank.blaschka
@ 2010-11-26 12:41 ` frank.blaschka
2010-11-26 12:41 ` [patch 3/4] [PATCH] qeth: enable interface setup if LAN is offline frank.blaschka
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: frank.blaschka @ 2010-11-26 12:41 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Joe Perches
[-- Attachment #1: 602-unnecessary-semicolons.diff --]
[-- Type: text/plain, Size: 606 bytes --]
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/qeth_core_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/s390/net/qeth_core_sys.c
+++ b/drivers/s390/net/qeth_core_sys.c
@@ -372,7 +372,7 @@ static ssize_t qeth_dev_performance_stat
i = simple_strtoul(buf, &tmp, 16);
if ((i == 0) || (i == 1)) {
if (i == card->options.performance_stats)
- goto out;;
+ goto out;
card->options.performance_stats = i;
if (i == 0)
memset(&card->perf_stats, 0,
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 3/4] [PATCH] qeth: enable interface setup if LAN is offline
2010-11-26 12:41 [patch 0/4] s390: qeth patches for net-next frank.blaschka
2010-11-26 12:41 ` [patch 1/4] [PATCH] qeth lcs: convert mc rwlock to RCU frank.blaschka
2010-11-26 12:41 ` [patch 2/4] [PATCH] drivers/s390/net: Remove unnecessary semicolons frank.blaschka
@ 2010-11-26 12:41 ` frank.blaschka
2010-11-26 12:41 ` [patch 4/4] [PATCH] qeth: l3 fix len in tso hdr frank.blaschka
2010-11-29 2:13 ` [patch 0/4] s390: qeth patches for net-next David Miller
4 siblings, 0 replies; 8+ messages in thread
From: frank.blaschka @ 2010-11-26 12:41 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390, Ursula Braun
[-- Attachment #1: 603-qeth-recovery-offline.diff --]
[-- Type: text/plain, Size: 3656 bytes --]
From: Ursula Braun <ursula.braun@de.ibm.com>
Device initialization of a qeth device contains a STARTLAN step.
This step may fail, if cable is not yet plugged in. The qeth device
stays in state HARDSETUP until cable is plugged in. This prevents
further preparational initialization steps of the qeth device and
its network interface. This patch makes sure initialization of qeth
device continues, even though cable is not yet plugged in.
Once carrier is available, qeth is notified, triggers a recovery
which results in a working network interface.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/qeth_l2_main.c | 11 ++++++-----
drivers/s390/net/qeth_l3_main.c | 11 ++++++-----
2 files changed, 12 insertions(+), 10 deletions(-)
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -849,8 +849,6 @@ static int qeth_l2_open(struct net_devic
card->state = CARD_STATE_UP;
netif_start_queue(dev);
- if (!card->lan_online && netif_carrier_ok(dev))
- netif_carrier_off(dev);
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
napi_schedule(&card->napi);
@@ -1013,13 +1011,14 @@ static int __qeth_l2_set_online(struct c
dev_warn(&card->gdev->dev,
"The LAN is offline\n");
card->lan_online = 0;
- goto out;
+ goto contin;
}
rc = -ENODEV;
goto out_remove;
} else
card->lan_online = 1;
+contin:
if ((card->info.type == QETH_CARD_TYPE_OSD) ||
(card->info.type == QETH_CARD_TYPE_OSX))
/* configure isolation level */
@@ -1038,7 +1037,10 @@ static int __qeth_l2_set_online(struct c
goto out_remove;
}
card->state = CARD_STATE_SOFTSETUP;
- netif_carrier_on(card->dev);
+ if (card->lan_online)
+ netif_carrier_on(card->dev);
+ else
+ netif_carrier_off(card->dev);
qeth_set_allowed_threads(card, 0xffffffff, 0);
if (recover_flag == CARD_STATE_RECOVER) {
@@ -1055,7 +1057,6 @@ static int __qeth_l2_set_online(struct c
}
/* let user_space know that device is online */
kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE);
-out:
mutex_unlock(&card->conf_mutex);
mutex_unlock(&card->discipline_mutex);
return 0;
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3177,8 +3177,6 @@ static int qeth_l3_open(struct net_devic
card->state = CARD_STATE_UP;
netif_start_queue(dev);
- if (!card->lan_online && netif_carrier_ok(dev))
- netif_carrier_off(dev);
if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
napi_enable(&card->napi);
napi_schedule(&card->napi);
@@ -3450,13 +3448,14 @@ static int __qeth_l3_set_online(struct c
dev_warn(&card->gdev->dev,
"The LAN is offline\n");
card->lan_online = 0;
- goto out;
+ goto contin;
}
rc = -ENODEV;
goto out_remove;
} else
card->lan_online = 1;
+contin:
rc = qeth_l3_setadapter_parms(card);
if (rc)
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
@@ -3481,10 +3480,13 @@ static int __qeth_l3_set_online(struct c
goto out_remove;
}
card->state = CARD_STATE_SOFTSETUP;
- netif_carrier_on(card->dev);
qeth_set_allowed_threads(card, 0xffffffff, 0);
qeth_l3_set_ip_addr_list(card);
+ if (card->lan_online)
+ netif_carrier_on(card->dev);
+ else
+ netif_carrier_off(card->dev);
if (recover_flag == CARD_STATE_RECOVER) {
if (recovery_mode)
qeth_l3_open(card->dev);
@@ -3497,7 +3499,6 @@ static int __qeth_l3_set_online(struct c
}
/* let user_space know that device is online */
kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE);
-out:
mutex_unlock(&card->conf_mutex);
mutex_unlock(&card->discipline_mutex);
return 0;
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 4/4] [PATCH] qeth: l3 fix len in tso hdr
2010-11-26 12:41 [patch 0/4] s390: qeth patches for net-next frank.blaschka
` (2 preceding siblings ...)
2010-11-26 12:41 ` [patch 3/4] [PATCH] qeth: enable interface setup if LAN is offline frank.blaschka
@ 2010-11-26 12:41 ` frank.blaschka
2010-11-29 2:13 ` [patch 0/4] s390: qeth patches for net-next David Miller
4 siblings, 0 replies; 8+ messages in thread
From: frank.blaschka @ 2010-11-26 12:41 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390
[-- Attachment #1: qeth_tso_hdr.patch --]
[-- Type: text/plain, Size: 751 bytes --]
From: Frank Blaschka <frank.blaschka@de.ibm.com>
The tso hdr is longer then the regular l3 hdr. Fix the calculation
of the total len by accounting the size of the tso hdr.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/qeth_l3_main.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2939,6 +2939,7 @@ static void qeth_tso_fill_header(struct
/*fix header to TSO values ...*/
hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO;
+ hdr->hdr.hdr.l3.length = skb->len - sizeof(struct qeth_hdr_tso);
/*set values which are fix for the first approach ...*/
hdr->ext.hdr_tot_len = (__u16) sizeof(struct qeth_hdr_ext_tso);
hdr->ext.imb_hdr_no = 1;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 0/4] s390: qeth patches for net-next
2010-11-26 12:41 [patch 0/4] s390: qeth patches for net-next frank.blaschka
` (3 preceding siblings ...)
2010-11-26 12:41 ` [patch 4/4] [PATCH] qeth: l3 fix len in tso hdr frank.blaschka
@ 2010-11-29 2:13 ` David Miller
4 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2010-11-29 2:13 UTC (permalink / raw)
To: frank.blaschka; +Cc: netdev, linux-s390
From: frank.blaschka@de.ibm.com
Date: Fri, 26 Nov 2010 13:41:16 +0100
> here are some patches for net-next.
> The set contains also the patch from Sachin Sant to fix the s390 build.
All applied, thank you.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 0/4] s390: qeth patches for net-next
@ 2010-12-08 12:57 frank.blaschka
2010-12-10 22:29 ` David Miller
0 siblings, 1 reply; 8+ messages in thread
From: frank.blaschka @ 2010-12-08 12:57 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-s390
Hi Dave,
here is another patch set for net-next.
shortlog:
Jan Glauber (1)
qeth: buffer count imbalance
Einar Lueck (2)
qeth: support ipv6 query arp cache for HiperSockets
qeth: support VIPA add/del in offline mode
Frank Blaschka (1)
qeth: l3 add vlan hdr in passthru frames
Thanks,
Frank
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 0/4] s390: qeth patches for net-next
2010-12-08 12:57 frank.blaschka
@ 2010-12-10 22:29 ` David Miller
0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2010-12-10 22:29 UTC (permalink / raw)
To: frank.blaschka; +Cc: netdev, linux-s390
From: frank.blaschka@de.ibm.com
Date: Wed, 08 Dec 2010 13:57:57 +0100
> here is another patch set for net-next.
All applied, thank you.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-12-10 22:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 12:41 [patch 0/4] s390: qeth patches for net-next frank.blaschka
2010-11-26 12:41 ` [patch 1/4] [PATCH] qeth lcs: convert mc rwlock to RCU frank.blaschka
2010-11-26 12:41 ` [patch 2/4] [PATCH] drivers/s390/net: Remove unnecessary semicolons frank.blaschka
2010-11-26 12:41 ` [patch 3/4] [PATCH] qeth: enable interface setup if LAN is offline frank.blaschka
2010-11-26 12:41 ` [patch 4/4] [PATCH] qeth: l3 fix len in tso hdr frank.blaschka
2010-11-29 2:13 ` [patch 0/4] s390: qeth patches for net-next David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-12-08 12:57 frank.blaschka
2010-12-10 22:29 ` 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).