Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c63d11ba authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 's390-next'



Julian Wiedmann says:

====================
s390/qeth: updates 2019-03-28

please apply the following patchset to net-next. This reworks the control
IO code in qeth so that we no longer need to poll for cmd completion,
and refactors the IDX setup code to also use this improved IO path.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1571e2fd 2e873d10
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#ifndef __QETH_CORE_H__
#define __QETH_CORE_H__

#include <linux/completion.h>
#include <linux/if.h>
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
@@ -21,6 +22,7 @@
#include <linux/hashtable.h>
#include <linux/ip.h>
#include <linux/refcount.h>
#include <linux/wait.h>
#include <linux/workqueue.h>

#include <net/ipv6.h>
@@ -538,7 +540,6 @@ struct qeth_qdio_info {
enum qeth_channel_states {
	CH_STATE_UP,
	CH_STATE_DOWN,
	CH_STATE_ACTIVATING,
	CH_STATE_HALTED,
	CH_STATE_STOPPED,
	CH_STATE_RCD,
@@ -585,7 +586,10 @@ struct qeth_cmd_buffer {
	enum qeth_cmd_buffer_state state;
	struct qeth_channel *channel;
	struct qeth_reply *reply;
	long timeout;
	unsigned char *data;
	void (*finalize)(struct qeth_card *card, struct qeth_cmd_buffer *iob,
			 unsigned int length);
	void (*callback)(struct qeth_card *card, struct qeth_channel *channel,
			 struct qeth_cmd_buffer *iob);
};
@@ -610,6 +614,11 @@ struct qeth_channel {
	int io_buf_no;
};

static inline bool qeth_trylock_channel(struct qeth_channel *channel)
{
	return atomic_cmpxchg(&channel->irq_pending, 0, 1) == 0;
}

/**
 *  OSA card related definitions
 */
@@ -636,12 +645,11 @@ struct qeth_seqno {

struct qeth_reply {
	struct list_head list;
	wait_queue_head_t wait_q;
	struct completion received;
	int (*callback)(struct qeth_card *, struct qeth_reply *,
		unsigned long);
	u32 seqno;
	unsigned long offset;
	atomic_t received;
	int rc;
	void *param;
	refcount_t refcnt;
@@ -774,18 +782,19 @@ struct qeth_card {
	struct qeth_card_options options;

	struct workqueue_struct *event_wq;
	struct workqueue_struct *cmd_wq;
	wait_queue_head_t wait_q;
	spinlock_t mclock;
	unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
	DECLARE_HASHTABLE(mac_htable, 4);
	DECLARE_HASHTABLE(ip_htable, 4);
	struct mutex ip_lock;
	DECLARE_HASHTABLE(ip_mc_htable, 4);
	struct work_struct rx_mode_work;
	struct work_struct kernel_thread_starter;
	spinlock_t thread_mask_lock;
	unsigned long thread_start_mask;
	unsigned long thread_allowed_mask;
	unsigned long thread_running_mask;
	spinlock_t ip_lock;
	struct qeth_ipato ipato;
	struct list_head cmd_waiter_list;
	/* QDIO buffer handling */
@@ -983,8 +992,6 @@ void qeth_clear_qdio_buffers(struct qeth_card *);
void qeth_setadp_promisc_mode(struct qeth_card *);
int qeth_setadpparms_change_macaddr(struct qeth_card *);
void qeth_tx_timeout(struct net_device *);
void qeth_prepare_control_data(struct qeth_card *, int,
				struct qeth_cmd_buffer *);
void qeth_release_buffer(struct qeth_channel *, struct qeth_cmd_buffer *);
void qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
			  u16 cmd_length);
+281 −286

File changed.

Preview size limit exceeded, changes collapsed.

+22 −14

File changed.

Preview size limit exceeded, changes collapsed.

+113 −54

File changed.

Preview size limit exceeded, changes collapsed.

+10 −10
Original line number Diff line number Diff line
@@ -367,9 +367,9 @@ static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev,

	if (card->ipato.enabled != enable) {
		card->ipato.enabled = enable;
		spin_lock_bh(&card->ip_lock);
		mutex_lock(&card->ip_lock);
		qeth_l3_update_ipato(card);
		spin_unlock_bh(&card->ip_lock);
		mutex_unlock(&card->ip_lock);
	}
out:
	mutex_unlock(&card->conf_mutex);
@@ -412,9 +412,9 @@ static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev,

	if (card->ipato.invert4 != invert) {
		card->ipato.invert4 = invert;
		spin_lock_bh(&card->ip_lock);
		mutex_lock(&card->ip_lock);
		qeth_l3_update_ipato(card);
		spin_unlock_bh(&card->ip_lock);
		mutex_unlock(&card->ip_lock);
	}
out:
	mutex_unlock(&card->conf_mutex);
@@ -436,7 +436,7 @@ static ssize_t qeth_l3_dev_ipato_add_show(char *buf, struct qeth_card *card,
	entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
	/* add strlen for "/<mask>\n" */
	entry_len += (proto == QETH_PROT_IPV4)? 5 : 6;
	spin_lock_bh(&card->ip_lock);
	mutex_lock(&card->ip_lock);
	list_for_each_entry(ipatoe, &card->ipato.entries, entry) {
		if (ipatoe->proto != proto)
			continue;
@@ -449,7 +449,7 @@ static ssize_t qeth_l3_dev_ipato_add_show(char *buf, struct qeth_card *card,
		i += snprintf(buf + i, PAGE_SIZE - i,
			      "%s/%i\n", addr_str, ipatoe->mask_bits);
	}
	spin_unlock_bh(&card->ip_lock);
	mutex_unlock(&card->ip_lock);
	i += snprintf(buf + i, PAGE_SIZE - i, "\n");

	return i;
@@ -598,9 +598,9 @@ static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev,

	if (card->ipato.invert6 != invert) {
		card->ipato.invert6 = invert;
		spin_lock_bh(&card->ip_lock);
		mutex_lock(&card->ip_lock);
		qeth_l3_update_ipato(card);
		spin_unlock_bh(&card->ip_lock);
		mutex_unlock(&card->ip_lock);
	}
out:
	mutex_unlock(&card->conf_mutex);
@@ -684,7 +684,7 @@ static ssize_t qeth_l3_dev_ip_add_show(struct device *dev, char *buf,

	entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
	entry_len += 2; /* \n + terminator */
	spin_lock_bh(&card->ip_lock);
	mutex_lock(&card->ip_lock);
	hash_for_each(card->ip_htable, i, ipaddr, hnode) {
		if (ipaddr->proto != proto || ipaddr->type != type)
			continue;
@@ -698,7 +698,7 @@ static ssize_t qeth_l3_dev_ip_add_show(struct device *dev, char *buf,
		str_len += snprintf(buf + str_len, PAGE_SIZE - str_len, "%s\n",
				    addr_str);
	}
	spin_unlock_bh(&card->ip_lock);
	mutex_unlock(&card->ip_lock);
	str_len += snprintf(buf + str_len, PAGE_SIZE - str_len, "\n");

	return str_len;