s390: network driver bug fixes for 3.2.0 next rc
Subsystems (5)
cover s390: network driver bug fixes for 3.2.0 next rc
Hi Dave,
here are a couple of s390 network driver bug fixes for 3.2.0 next rc
shortlog:
Ursula Braun (2)
qeth: return with -EPERM if sniffing is not enabled
netiucv: reinsert dev_alloc_name for device naming
Frank Blaschka (1)
qeth: l3 fix rcu splat in xmit
Christian Borntraeger (1)
qeth: remove WARN_ON leftover
Einar Lueck (1)
qeth: Reduce CPU consumption through less SIGA-r calls
Thanks,
Frank
PATCH 1/5 qeth: return with -EPERM if sniffing is not enabled
From: Ursula Braun <[email protected]>
Without appropriate configuration at the SE, a HiperSockets device cannot be used for sniffing. Setting the sniffer attribute is rejected with -EPERM.
---
drivers/s390/net/qeth_l3_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_l3_sys.c +2 -2
@@ -335,10 +335,10 @@ static ssize_t qeth_l3_dev_sniffer_store QETH_IN_BUF_COUNT_MAX)qeth_realloc_buffer_pool (card ,QETH_IN_BUF_COUNT_MAX ); -break ; }else rc = -EPERM ; -default :/* fall through */ +break ; +default : rc = -EINVAL ; } out:
PATCH 2/5 qeth: remove WARN_ON leftover
In reply to [email protected]From: Christian Borntraeger <[email protected]>
The patch "qeth: exploit asynchronous delivery of storage blocks" added a WARN_ON in qeth_schedule_recovery. A device recovery should not cause a kernel warning. This is obviously a debugging left-over that we forgot to remove.
---
drivers/s390/net/qeth_core_main.c | 1 - 1 file changed, 1 deletion(-)
drivers/s390/net/qeth_core_main.c +0 -1
@@ -881,7 +881,6 @@ EXPORT_SYMBOL_GPL(qeth_do_run_thread);void qeth_schedule_recovery (struct qeth_card *card) {QETH_CARD_TEXT (card,2 ,"startrec" ); -WARN_ON (1 );if (qeth_set_thread_start_bit (card,QETH_RECOVER_THREAD ) ==0 )schedule_work (&card->kernel_thread_starter); }
PATCH 3/5 netiucv: reinsert dev_alloc_name for device naming
In reply to [email protected]From: Ursula Braun <[email protected]>
Invocation of dev_alloc_name() is re-inserted, because the created net_device name is used to create the device name for the iucv bus. This device is created before the register_netdev call.
---
drivers/s390/net/netiucv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/s390/net/netiucv.c +2 -0
@@ -1994,6 +1994,8 @@ static struct net_device *netiucv_init_n netiucv_setup_netdevice);if (!dev)return NULL ; +if (dev_alloc_name (dev, dev->name) <0 ) + goto out_netdev; privptr =netdev_priv (dev); privptr->fsm = init_fsm("netiucvdev", dev_state_names,
PATCH 4/5 qeth: l3 fix rcu splat in xmit
In reply to [email protected]From: Frank Blaschka <[email protected]>
when use dst_get_neighbour to get neighbour, we need rcu_read_lock to protect, since dst_get_neighbour uses rcu_dereference.
===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------include/net/dst.h:91 invoked rcu_dereference_check() without protection!
...
Call Trace: ([<0000000000011ad8>] show_trace+0x158/0x15c) [<00000000003c395a>] qeth_l3_hard_start_xmit+0x212/0xb2c [<00000000004006ac>] dev_hard_start_xmit+0x444/0x9bc [<000000000041effa>] sch_direct_xmit+0xd2/0x328 [<000000000041f32a>] __qdisc_run+0xda/0x198 [<00000000003f84b6>] net_tx_action+0x152/0x360 [<000000000005798e>] __do_softirq+0xee/0x3b0 [<0000000000021330>] do_softirq+0xac/0x100 ([<00000000000212f2>] do_softirq+0x6e/0x100) [<0000000000057142>] local_bh_enable_ip+0x11a/0x120 [<000000000043ff50>] tcp_sendmsg+0x21c/0xe08 [<00000000003dfcdc>] sock_sendmsg+0xc8/0x100 [<00000000003e3d98>] SyS_sendto+0x108/0x140 [<00000000003e3e1c>] SyS_send+0x4c/0x5c [<00000000003e4b62>] SyS_socketcall+0x206/0x348 [<00000000004e95ca>] sysc_noemu+0x16/0x1c [<0000004a2a87dbb0>] 0x4a2a87dbb0
INFO: lockdep is turned off.
---
drivers/s390/net/qeth_l3_main.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/s390/net/qeth_l3_main.c +7 -0
@@ -2756,11 +2756,13 @@ int inline qeth_l3_get_cast_type(structstruct neighbour *n =NULL ;struct dst_entry *dst; +rcu_read_lock (); dst =skb_dst (skb);if (dst) n =dst_get_neighbour (dst);if (n) { cast_type = n->type; +rcu_read_unlock ();if ((cast_type ==RTN_BROADCAST ) || (cast_type ==RTN_MULTICAST ) || (cast_type ==RTN_ANYCAST ))
@@ -2768,6 +2770,8 @@ int inline qeth_l3_get_cast_type(structelse return RTN_UNSPEC ; } +rcu_read_unlock (); +/* try something else */ if (skb->protocol ==ETH_P_IPV6 ) return (skb_network_header(skb)[24] == 0xff) ?
@@ -2847,6 +2851,8 @@ static void qeth_l3_fill_header(struct q } hdr->hdr.l3.length = skb->len -sizeof (struct qeth_hdr ); + +rcu_read_lock (); dst =skb_dst (skb);if (dst) n =dst_get_neighbour (dst);
@@ -2893,6 +2899,7 @@ static void qeth_l3_fill_header(struct qQETH_CAST_UNICAST |QETH_HDR_PASSTHRU ; } } +rcu_read_unlock (); } static inline void qeth_l3_hdr_csum(struct qeth_card *card,
PATCH 5/5 qeth: Reduce CPU consumption through less SIGA-r calls
In reply to [email protected]From: Einar Lueck <[email protected]>
Patch avoids SIGA-r calls in case of SIGA-r required. It only calls SIGA-r if a threshold of free buffer is reached. CPU consumption is reduced as a consequence.
---
drivers/s390/net/qeth_core.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/s390/net/qeth_core.h +1 -2
@@ -236,8 +236,7 @@ static inline int qeth_is_ipa_enabled(st#define QETH_IN_BUF_COUNT_MAX 128#define QETH_MAX_BUFFER_ELEMENTS (card) ((card)->qdio.in_buf_size >> 12)#define QETH_IN_BUF_REQUEUE_THRESHOLD (card) \ - ((card)->ssqd.qdioac1 & AC1_SIGA_INPUT_NEEDED ? 1 : \ - ((card)->qdio.in_buf_pool.buf_count / 2)) + ((card)->qdio.in_buf_pool.buf_count / 2)/* buffers we have to be behind before we get a PCI */ #define QETH_PCI_THRESHOLD_A (card) ((card)->qdio.in_buf_pool.buf_count+1)
David Miller
maintainerFrom: [email protected]
Date: Tue, 15 Nov 2011 13:31:11 +0100
Quoted 1 line
here are a couple of s390 network driver bug fixes for 3.2.0 next rc
All applied, thanks.