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

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

Merge branch 's390-net-next'



Julian Wiedmann says:

====================
s390/net: updates 2018-09-26

please apply one more series of cleanups and small improvements for qeth
to net-next. Note that one patch needs to touch both af_iucv and qeth, in
order to untangle their receive paths.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 4b1bd697 91cc98f5
Loading
Loading
Loading
Loading
+12 −9
Original line number Original line Diff line number Diff line
@@ -582,7 +582,8 @@ struct qeth_cmd_buffer {
	struct qeth_channel *channel;
	struct qeth_channel *channel;
	unsigned char *data;
	unsigned char *data;
	int rc;
	int rc;
	void (*callback) (struct qeth_channel *, struct qeth_cmd_buffer *);
	void (*callback)(struct qeth_card *card, struct qeth_channel *channel,
			 struct qeth_cmd_buffer *iob);
};
};


static inline struct qeth_ipa_cmd *__ipa_cmd(struct qeth_cmd_buffer *iob)
static inline struct qeth_ipa_cmd *__ipa_cmd(struct qeth_cmd_buffer *iob)
@@ -671,6 +672,12 @@ struct qeth_card_info {
	__u32 hwtrap;
	__u32 hwtrap;
};
};


enum qeth_discipline_id {
	QETH_DISCIPLINE_UNDETERMINED = -1,
	QETH_DISCIPLINE_LAYER3 = 0,
	QETH_DISCIPLINE_LAYER2 = 1,
};

struct qeth_card_options {
struct qeth_card_options {
	struct qeth_routing_info route4;
	struct qeth_routing_info route4;
	struct qeth_ipa_info ipa4;
	struct qeth_ipa_info ipa4;
@@ -680,7 +687,7 @@ struct qeth_card_options {
	struct qeth_sbp_info sbp; /* SETBRIDGEPORT options */
	struct qeth_sbp_info sbp; /* SETBRIDGEPORT options */
	struct qeth_vnicc_info vnicc; /* VNICC options */
	struct qeth_vnicc_info vnicc; /* VNICC options */
	int fake_broadcast;
	int fake_broadcast;
	int layer2;
	enum qeth_discipline_id layer;
	int performance_stats;
	int performance_stats;
	int rx_sg_cb;
	int rx_sg_cb;
	enum qeth_ipa_isolation_modes isolation;
	enum qeth_ipa_isolation_modes isolation;
@@ -690,6 +697,9 @@ struct qeth_card_options {
	char hsuid[9];
	char hsuid[9];
};
};


#define	IS_LAYER2(card)	((card)->options.layer == QETH_DISCIPLINE_LAYER2)
#define	IS_LAYER3(card)	((card)->options.layer == QETH_DISCIPLINE_LAYER3)

/*
/*
 * thread bits for qeth_card thread masks
 * thread bits for qeth_card thread masks
 */
 */
@@ -702,12 +712,6 @@ struct qeth_osn_info {
	int (*data_cb)(struct sk_buff *skb);
	int (*data_cb)(struct sk_buff *skb);
};
};


enum qeth_discipline_id {
	QETH_DISCIPLINE_UNDETERMINED = -1,
	QETH_DISCIPLINE_LAYER3 = 0,
	QETH_DISCIPLINE_LAYER2 = 1,
};

struct qeth_discipline {
struct qeth_discipline {
	const struct device_type *devtype;
	const struct device_type *devtype;
	int (*process_rx_buffer)(struct qeth_card *card, int budget, int *done);
	int (*process_rx_buffer)(struct qeth_card *card, int budget, int *done);
@@ -759,7 +763,6 @@ struct qeth_switch_info {
struct qeth_card {
struct qeth_card {
	struct list_head list;
	struct list_head list;
	enum qeth_card_states state;
	enum qeth_card_states state;
	int lan_online;
	spinlock_t lock;
	spinlock_t lock;
	struct ccwgroup_device *gdev;
	struct ccwgroup_device *gdev;
	struct qeth_channel read;
	struct qeth_channel read;
+155 −218

File changed.

Preview size limit exceeded, changes collapsed.

+6 −9
Original line number Original line Diff line number Diff line
@@ -31,10 +31,9 @@ static ssize_t qeth_dev_state_show(struct device *dev,
	case CARD_STATE_SOFTSETUP:
	case CARD_STATE_SOFTSETUP:
		return sprintf(buf, "SOFTSETUP\n");
		return sprintf(buf, "SOFTSETUP\n");
	case CARD_STATE_UP:
	case CARD_STATE_UP:
		if (card->lan_online)
		return sprintf(buf, "UP (LAN %s)\n",
		return sprintf(buf, "UP (LAN ONLINE)\n");
			       netif_carrier_ok(card->dev) ? "ONLINE" :
		else
							     "OFFLINE");
			return sprintf(buf, "UP (LAN OFFLINE)\n");
	case CARD_STATE_RECOVER:
	case CARD_STATE_RECOVER:
		return sprintf(buf, "RECOVER\n");
		return sprintf(buf, "RECOVER\n");
	default:
	default:
@@ -228,7 +227,7 @@ static ssize_t qeth_dev_prioqing_store(struct device *dev,
		card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS;
		card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_TOS;
		card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
		card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
	} else if (sysfs_streq(buf, "prio_queueing_vlan")) {
	} else if (sysfs_streq(buf, "prio_queueing_vlan")) {
		if (!card->options.layer2) {
		if (IS_LAYER3(card)) {
			rc = -ENOTSUPP;
			rc = -ENOTSUPP;
			goto out;
			goto out;
		}
		}
@@ -379,7 +378,7 @@ static ssize_t qeth_dev_layer2_show(struct device *dev,
	if (!card)
	if (!card)
		return -EINVAL;
		return -EINVAL;


	return sprintf(buf, "%i\n", card->options.layer2);
	return sprintf(buf, "%i\n", card->options.layer);
}
}


static ssize_t qeth_dev_layer2_store(struct device *dev,
static ssize_t qeth_dev_layer2_store(struct device *dev,
@@ -413,7 +412,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
		goto out;
		goto out;
	}
	}


	if (card->options.layer2 == newdis)
	if (card->options.layer == newdis)
		goto out;
		goto out;
	if (card->info.layer_enforced) {
	if (card->info.layer_enforced) {
		/* fixed layer, can't switch */
		/* fixed layer, can't switch */
@@ -432,8 +431,6 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,


		card->discipline->remove(card->gdev);
		card->discipline->remove(card->gdev);
		qeth_core_free_discipline(card);
		qeth_core_free_discipline(card);
		card->options.layer2 = -1;

		free_netdev(card->dev);
		free_netdev(card->dev);
		card->dev = ndev;
		card->dev = ndev;
	}
	}
+2 −10
Original line number Original line Diff line number Diff line
@@ -694,7 +694,7 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb,
	int tx_bytes = skb->len;
	int tx_bytes = skb->len;
	int rc;
	int rc;


	if ((card->state != CARD_STATE_UP) || !card->lan_online) {
	if (card->state != CARD_STATE_UP) {
		card->stats.tx_carrier_errors++;
		card->stats.tx_carrier_errors++;
		goto tx_drop;
		goto tx_drop;
	}
	}
@@ -806,7 +806,6 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev)
	}
	}
	INIT_LIST_HEAD(&card->vid_list);
	INIT_LIST_HEAD(&card->vid_list);
	hash_init(card->mac_htable);
	hash_init(card->mac_htable);
	card->options.layer2 = 1;
	card->info.hwtrap = 0;
	card->info.hwtrap = 0;
	qeth_l2_vnicc_set_defaults(card);
	qeth_l2_vnicc_set_defaults(card);
	return 0;
	return 0;
@@ -998,10 +997,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
		goto out_remove;
		goto out_remove;
	}
	}
	card->state = CARD_STATE_SOFTSETUP;
	card->state = CARD_STATE_SOFTSETUP;
	if (card->lan_online)
		netif_carrier_on(card->dev);
	else
		netif_carrier_off(card->dev);


	qeth_set_allowed_threads(card, 0xffffffff, 0);
	qeth_set_allowed_threads(card, 0xffffffff, 0);


@@ -1147,9 +1142,6 @@ static int qeth_l2_pm_resume(struct ccwgroup_device *gdev)
	struct qeth_card *card = dev_get_drvdata(&gdev->dev);
	struct qeth_card *card = dev_get_drvdata(&gdev->dev);
	int rc = 0;
	int rc = 0;


	if (gdev->state == CCWGROUP_OFFLINE)
		goto out;

	if (card->state == CARD_STATE_RECOVER) {
	if (card->state == CARD_STATE_RECOVER) {
		rc = __qeth_l2_set_online(card->gdev, 1);
		rc = __qeth_l2_set_online(card->gdev, 1);
		if (rc) {
		if (rc) {
@@ -1159,7 +1151,7 @@ static int qeth_l2_pm_resume(struct ccwgroup_device *gdev)
		}
		}
	} else
	} else
		rc = __qeth_l2_set_online(card->gdev, 0);
		rc = __qeth_l2_set_online(card->gdev, 0);
out:

	qeth_set_allowed_threads(card, 0xffffffff, 0);
	qeth_set_allowed_threads(card, 0xffffffff, 0);
	netif_device_attach(card->dev);
	netif_device_attach(card->dev);
	if (rc)
	if (rc)
+7 −17

File changed.

Preview size limit exceeded, changes collapsed.

Loading