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

Merge branch 's390-next'



Karsten Graul says:

====================
s390/net: updates 2021-11-18

Please apply the following patches to netdev's net-next tree.

Heiko provided fixes for kernel doc comments and solved some
other compiler warnings.
Julians qeth patch simplifies the rx queue handling in the code.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2edc4bf6 09ae5982
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ extern struct ctcm_dbf_info ctcm_dbf[CTCM_DBF_INFOS];

int ctcm_register_dbf_views(void);
void ctcm_unregister_dbf_views(void);
__printf(3, 4)
void ctcm_dbf_longtext(enum ctcm_dbf_names dbf_nix, int level, char *text, ...);

static inline const char *strtail(const char *s, int n)
+1 −1
Original line number Diff line number Diff line
@@ -1406,7 +1406,7 @@ static void ctcmpc_chx_rx(fsm_instance *fi, int event, void *arg)

		if (new_skb == NULL) {
			CTCM_DBF_TEXT_(MPC_ERROR, CTC_DBF_ERROR,
				"%s(%d): skb allocation failed",
				"%s(%s): skb allocation failed",
						CTCM_FUNTAIL, dev->name);
			fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev);
					goto again;
+6 −5
Original line number Diff line number Diff line
@@ -1808,19 +1808,20 @@ lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
			return;
		}
		/* What kind of frame is it? */
		if (lcs_hdr->type == LCS_FRAME_TYPE_CONTROL)
		if (lcs_hdr->type == LCS_FRAME_TYPE_CONTROL) {
			/* Control frame. */
			lcs_get_control(card, (struct lcs_cmd *) lcs_hdr);
		else if (lcs_hdr->type == LCS_FRAME_TYPE_ENET ||
		} else if (lcs_hdr->type == LCS_FRAME_TYPE_ENET ||
			   lcs_hdr->type == LCS_FRAME_TYPE_TR ||
			 lcs_hdr->type == LCS_FRAME_TYPE_FDDI)
			   lcs_hdr->type == LCS_FRAME_TYPE_FDDI) {
			/* Normal network packet. */
			lcs_get_skb(card, (char *)(lcs_hdr + 1),
				    lcs_hdr->offset - offset -
				    sizeof(struct lcs_header));
		else
		} else {
			/* Unknown frame type. */
			; // FIXME: error message ?
		}
		/* Proceed to next frame. */
		offset = lcs_hdr->offset;
		lcs_hdr->offset = LCS_ILLEGAL_OFFSET;
+17 −18
Original line number Diff line number Diff line
@@ -194,9 +194,6 @@ static void qeth_clear_working_pool_list(struct qeth_card *card)
				 &card->qdio.in_buf_pool.entry_list, list)
		list_del(&pool_entry->list);

	if (!queue)
		return;

	for (i = 0; i < ARRAY_SIZE(queue->bufs); i++)
		queue->bufs[i].pool_entry = NULL;
}
@@ -275,8 +272,8 @@ int qeth_resize_buffer_pool(struct qeth_card *card, unsigned int count)

	QETH_CARD_TEXT(card, 2, "realcbp");

	/* Defer until queue is allocated: */
	if (!card->qdio.in_q)
	/* Defer until pool is allocated: */
	if (list_empty(&pool->entry_list))
		goto out;

	/* Remove entries from the pool: */
@@ -2557,14 +2554,9 @@ static int qeth_alloc_qdio_queues(struct qeth_card *card)
		QETH_QDIO_ALLOCATED) != QETH_QDIO_UNINITIALIZED)
		return 0;

	QETH_CARD_TEXT(card, 2, "inq");
	card->qdio.in_q = qeth_alloc_qdio_queue();
	if (!card->qdio.in_q)
		goto out_nomem;

	/* inbound buffer pool */
	if (qeth_alloc_buffer_pool(card))
		goto out_freeinq;
		goto out_buffer_pool;

	/* outbound */
	for (i = 0; i < card->qdio.no_out_queues; ++i) {
@@ -2605,10 +2597,7 @@ static int qeth_alloc_qdio_queues(struct qeth_card *card)
		card->qdio.out_qs[i] = NULL;
	}
	qeth_free_buffer_pool(card);
out_freeinq:
	qeth_free_qdio_queue(card->qdio.in_q);
	card->qdio.in_q = NULL;
out_nomem:
out_buffer_pool:
	atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
	return -ENOMEM;
}
@@ -2623,11 +2612,12 @@ static void qeth_free_qdio_queues(struct qeth_card *card)

	qeth_free_cq(card);
	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
		if (card->qdio.in_q->bufs[j].rx_skb)
		if (card->qdio.in_q->bufs[j].rx_skb) {
			consume_skb(card->qdio.in_q->bufs[j].rx_skb);
			card->qdio.in_q->bufs[j].rx_skb = NULL;
		}
	qeth_free_qdio_queue(card->qdio.in_q);
	card->qdio.in_q = NULL;
	}

	/* inbound buffer pool */
	qeth_free_buffer_pool(card);
	/* free outbound qdio_qs */
@@ -6447,6 +6437,12 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)
	qeth_determine_capabilities(card);
	qeth_set_blkt_defaults(card);

	card->qdio.in_q = qeth_alloc_qdio_queue();
	if (!card->qdio.in_q) {
		rc = -ENOMEM;
		goto err_rx_queue;
	}

	card->qdio.no_out_queues = card->dev->num_tx_queues;
	rc = qeth_update_from_chp_desc(card);
	if (rc)
@@ -6473,6 +6469,8 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)

err_setup_disc:
err_chp_desc:
	qeth_free_qdio_queue(card->qdio.in_q);
err_rx_queue:
	free_netdev(card->dev);
err_card:
	qeth_core_free_card(card);
@@ -6494,6 +6492,7 @@ static void qeth_core_remove_device(struct ccwgroup_device *gdev)

	qeth_free_qdio_queues(card);

	qeth_free_qdio_queue(card->qdio.in_q);
	free_netdev(card->dev);
	qeth_core_free_card(card);
	put_device(&gdev->dev);
+19 −19
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ static inline size_t iucv_msg_length(struct iucv_message *msg)
 * iucv_sock_in_state() - check for specific states
 * @sk:		sock structure
 * @state:	first iucv sk state
 * @state:	second iucv sk state
 * @state2:	second iucv sk state
 *
 * Returns true if the socket in either in the first or second state.
 */
@@ -172,7 +172,7 @@ static inline int iucv_below_msglim(struct sock *sk)
			(atomic_read(&iucv->pendings) <= 0));
}

/**
/*
 * iucv_sock_wake_msglim() - Wake up thread waiting on msg limit
 */
static void iucv_sock_wake_msglim(struct sock *sk)
@@ -187,7 +187,7 @@ static void iucv_sock_wake_msglim(struct sock *sk)
	rcu_read_unlock();
}

/**
/*
 * afiucv_hs_send() - send a message through HiperSockets transport
 */
static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock,
@@ -1831,9 +1831,9 @@ static void afiucv_swap_src_dest(struct sk_buff *skb)
	memset(skb->data, 0, ETH_HLEN);
}

/**
/*
 * afiucv_hs_callback_syn - react on received SYN
 **/
 */
static int afiucv_hs_callback_syn(struct sock *sk, struct sk_buff *skb)
{
	struct af_iucv_trans_hdr *trans_hdr = iucv_trans_hdr(skb);
@@ -1896,9 +1896,9 @@ static int afiucv_hs_callback_syn(struct sock *sk, struct sk_buff *skb)
	return NET_RX_SUCCESS;
}

/**
/*
 * afiucv_hs_callback_synack() - react on received SYN-ACK
 **/
 */
static int afiucv_hs_callback_synack(struct sock *sk, struct sk_buff *skb)
{
	struct iucv_sock *iucv = iucv_sk(sk);
@@ -1917,9 +1917,9 @@ static int afiucv_hs_callback_synack(struct sock *sk, struct sk_buff *skb)
	return NET_RX_SUCCESS;
}

/**
/*
 * afiucv_hs_callback_synfin() - react on received SYN_FIN
 **/
 */
static int afiucv_hs_callback_synfin(struct sock *sk, struct sk_buff *skb)
{
	struct iucv_sock *iucv = iucv_sk(sk);
@@ -1937,9 +1937,9 @@ static int afiucv_hs_callback_synfin(struct sock *sk, struct sk_buff *skb)
	return NET_RX_SUCCESS;
}

/**
/*
 * afiucv_hs_callback_fin() - react on received FIN
 **/
 */
static int afiucv_hs_callback_fin(struct sock *sk, struct sk_buff *skb)
{
	struct iucv_sock *iucv = iucv_sk(sk);
@@ -1960,9 +1960,9 @@ static int afiucv_hs_callback_fin(struct sock *sk, struct sk_buff *skb)
	return NET_RX_SUCCESS;
}

/**
/*
 * afiucv_hs_callback_win() - react on received WIN
 **/
 */
static int afiucv_hs_callback_win(struct sock *sk, struct sk_buff *skb)
{
	struct iucv_sock *iucv = iucv_sk(sk);
@@ -1978,9 +1978,9 @@ static int afiucv_hs_callback_win(struct sock *sk, struct sk_buff *skb)
	return NET_RX_SUCCESS;
}

/**
/*
 * afiucv_hs_callback_rx() - react on received data
 **/
 */
static int afiucv_hs_callback_rx(struct sock *sk, struct sk_buff *skb)
{
	struct iucv_sock *iucv = iucv_sk(sk);
@@ -2022,11 +2022,11 @@ static int afiucv_hs_callback_rx(struct sock *sk, struct sk_buff *skb)
	return NET_RX_SUCCESS;
}

/**
/*
 * afiucv_hs_rcv() - base function for arriving data through HiperSockets
 *                   transport
 *                   called from netif RX softirq
 **/
 */
static int afiucv_hs_rcv(struct sk_buff *skb, struct net_device *dev,
	struct packet_type *pt, struct net_device *orig_dev)
{
@@ -2128,10 +2128,10 @@ static int afiucv_hs_rcv(struct sk_buff *skb, struct net_device *dev,
	return err;
}

/**
/*
 * afiucv_hs_callback_txnotify() - handle send notifications from HiperSockets
 *                                 transport
 **/
 */
static void afiucv_hs_callback_txnotify(struct sock *sk, enum iucv_tx_notify n)
{
	struct iucv_sock *iucv = iucv_sk(sk);
Loading