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

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

Merge branch 's390-next'



Julian Wiedmann says:

====================
s390/net: updates for 4.14

a mixed bag of minor fixes, cleanups and refactors for net-next. Please apply.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d396179c cb816192
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ static long ctcm_check_irb_error(struct ccw_device *cdev, struct irb *irb)
 *  ch		The channel, the sense code belongs to.
 *  sense	The sense code to inspect.
 */
static inline void ccw_unit_check(struct channel *ch, __u8 sense)
static void ccw_unit_check(struct channel *ch, __u8 sense)
{
	CTCM_DBF_TEXT_(TRACE, CTC_DBF_DEBUG,
			"%s(%s): %02x",
+12 −16
Original line number Diff line number Diff line
@@ -327,8 +327,7 @@ lcs_set_allowed_threads(struct lcs_card *card, unsigned long threads)
	spin_unlock_irqrestore(&card->mask_lock, flags);
	wake_up(&card->wait_q);
}
static inline int
lcs_threads_running(struct lcs_card *card, unsigned long threads)
static int lcs_threads_running(struct lcs_card *card, unsigned long threads)
{
        unsigned long flags;
        int rc = 0;
@@ -346,8 +345,7 @@ lcs_wait_for_threads(struct lcs_card *card, unsigned long threads)
                        lcs_threads_running(card, threads) == 0);
}

static inline int
lcs_set_thread_start_bit(struct lcs_card *card, unsigned long thread)
static int lcs_set_thread_start_bit(struct lcs_card *card, unsigned long thread)
{
        unsigned long flags;

@@ -373,8 +371,7 @@ lcs_clear_thread_running_bit(struct lcs_card *card, unsigned long thread)
        wake_up(&card->wait_q);
}

static inline int
__lcs_do_run_thread(struct lcs_card *card, unsigned long thread)
static int __lcs_do_run_thread(struct lcs_card *card, unsigned long thread)
{
        unsigned long flags;
        int rc = 0;
@@ -444,8 +441,7 @@ lcs_setup_card(struct lcs_card *card)
	INIT_LIST_HEAD(&card->lancmd_waiters);
}

static inline void
lcs_clear_multicast_list(struct lcs_card *card)
static void lcs_clear_multicast_list(struct lcs_card *card)
{
#ifdef	CONFIG_IP_MULTICAST
	struct lcs_ipm_list *ipm;
@@ -656,8 +652,7 @@ __lcs_resume_channel(struct lcs_channel *channel)
/**
 * Make a buffer ready for processing.
 */
static inline void
__lcs_ready_buffer_bits(struct lcs_channel *channel, int index)
static void __lcs_ready_buffer_bits(struct lcs_channel *channel, int index)
{
	int prev, next;

@@ -1169,8 +1164,8 @@ lcs_get_mac_for_ipm(__be32 ipm, char *mac, struct net_device *dev)
/**
 * function called by net device to handle multicast address relevant things
 */
static inline void
lcs_remove_mc_addresses(struct lcs_card *card, struct in_device *in4_dev)
static void lcs_remove_mc_addresses(struct lcs_card *card,
				    struct in_device *in4_dev)
{
	struct ip_mc_list *im4;
	struct list_head *l;
@@ -1196,8 +1191,9 @@ lcs_remove_mc_addresses(struct lcs_card *card, struct in_device *in4_dev)
	spin_unlock_irqrestore(&card->ipm_lock, flags);
}

static inline struct lcs_ipm_list *
lcs_check_addr_entry(struct lcs_card *card, struct ip_mc_list *im4, char *buf)
static struct lcs_ipm_list *lcs_check_addr_entry(struct lcs_card *card,
						 struct ip_mc_list *im4,
						 char *buf)
{
	struct lcs_ipm_list *tmp, *ipm = NULL;
	struct list_head *l;
@@ -1218,8 +1214,8 @@ lcs_check_addr_entry(struct lcs_card *card, struct ip_mc_list *im4, char *buf)
	return ipm;
}

static inline void
lcs_set_mc_addresses(struct lcs_card *card, struct in_device *in4_dev)
static void lcs_set_mc_addresses(struct lcs_card *card,
				 struct in_device *in4_dev)
{

	struct ip_mc_list *im4;
+2 −2
Original line number Diff line number Diff line
@@ -249,14 +249,14 @@ struct ll_header {
 * Compatibility macros for busy handling
 * of network devices.
 */
static inline void netiucv_clear_busy(struct net_device *dev)
static void netiucv_clear_busy(struct net_device *dev)
{
	struct netiucv_priv *priv = netdev_priv(dev);
	clear_bit(0, &priv->tbusy);
	netif_wake_queue(dev);
}

static inline int netiucv_test_and_set_busy(struct net_device *dev)
static int netiucv_test_and_set_busy(struct net_device *dev)
{
	struct netiucv_priv *priv = netdev_priv(dev);
	netif_stop_queue(dev);
+4 −7
Original line number Diff line number Diff line
@@ -857,11 +857,6 @@ static inline int qeth_get_ip_version(struct sk_buff *skb)
	}
}

static inline int qeth_get_ip_protocol(struct sk_buff *skb)
{
	return ip_hdr(skb)->protocol;
}

static inline void qeth_put_buffer_pool_entry(struct qeth_card *card,
		struct qeth_buffer_pool_entry *entry)
{
@@ -951,8 +946,10 @@ int qeth_get_priority_queue(struct qeth_card *, struct sk_buff *, int, int);
int qeth_get_elements_no(struct qeth_card *card, struct sk_buff *skb,
			 int extra_elems, int data_offset);
int qeth_get_elements_for_frags(struct sk_buff *);
int qeth_do_send_packet_fast(struct qeth_card *, struct qeth_qdio_out_q *,
			struct sk_buff *, struct qeth_hdr *, int, int);
int qeth_do_send_packet_fast(struct qeth_card *card,
			     struct qeth_qdio_out_q *queue, struct sk_buff *skb,
			     struct qeth_hdr *hdr, unsigned int offset,
			     int hd_len);
int qeth_do_send_packet(struct qeth_card *, struct qeth_qdio_out_q *,
		    struct sk_buff *, struct qeth_hdr *, int);
int qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
+70 −77
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void qeth_close_dev(struct qeth_card *card)
}
EXPORT_SYMBOL_GPL(qeth_close_dev);

static inline const char *qeth_get_cardname(struct qeth_card *card)
static const char *qeth_get_cardname(struct qeth_card *card)
{
	if (card->info.guestlan) {
		switch (card->info.type) {
@@ -330,7 +330,7 @@ static struct qeth_qdio_q *qeth_alloc_qdio_queue(void)
	return q;
}

static inline int qeth_cq_init(struct qeth_card *card)
static int qeth_cq_init(struct qeth_card *card)
{
	int rc;

@@ -352,7 +352,7 @@ static inline int qeth_cq_init(struct qeth_card *card)
	return rc;
}

static inline int qeth_alloc_cq(struct qeth_card *card)
static int qeth_alloc_cq(struct qeth_card *card)
{
	int rc;

@@ -397,7 +397,7 @@ static inline int qeth_alloc_cq(struct qeth_card *card)
	goto out;
}

static inline void qeth_free_cq(struct qeth_card *card)
static void qeth_free_cq(struct qeth_card *card)
{
	if (card->qdio.c_q) {
		--card->qdio.no_in_queues;
@@ -408,8 +408,9 @@ static inline void qeth_free_cq(struct qeth_card *card)
	card->qdio.out_bufstates = NULL;
}

static inline enum iucv_tx_notify qeth_compute_cq_notification(int sbalf15,
	int delayed) {
static enum iucv_tx_notify qeth_compute_cq_notification(int sbalf15,
							int delayed)
{
	enum iucv_tx_notify n;

	switch (sbalf15) {
@@ -432,8 +433,8 @@ static inline enum iucv_tx_notify qeth_compute_cq_notification(int sbalf15,
	return n;
}

static inline void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q,
	int bidx, int forced_cleanup)
static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx,
					 int forced_cleanup)
{
	if (q->card->options.cq != QETH_CQ_ENABLED)
		return;
@@ -475,8 +476,9 @@ static inline void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q,
}


static inline void qeth_qdio_handle_aob(struct qeth_card *card,
		unsigned long phys_aob_addr) {
static void qeth_qdio_handle_aob(struct qeth_card *card,
				 unsigned long phys_aob_addr)
{
	struct qaob *aob;
	struct qeth_qdio_out_buffer *buffer;
	enum iucv_tx_notify notification;
@@ -2228,7 +2230,7 @@ static int qeth_cm_setup(struct qeth_card *card)

}

static inline int qeth_get_initial_mtu_for_card(struct qeth_card *card)
static int qeth_get_initial_mtu_for_card(struct qeth_card *card)
{
	switch (card->info.type) {
	case QETH_CARD_TYPE_UNKNOWN:
@@ -2251,7 +2253,7 @@ static inline int qeth_get_initial_mtu_for_card(struct qeth_card *card)
	}
}

static inline int qeth_get_mtu_outof_framesize(int framesize)
static int qeth_get_mtu_outof_framesize(int framesize)
{
	switch (framesize) {
	case 0x4000:
@@ -2267,7 +2269,7 @@ static inline int qeth_get_mtu_outof_framesize(int framesize)
	}
}

static inline int qeth_mtu_is_valid(struct qeth_card *card, int mtu)
static int qeth_mtu_is_valid(struct qeth_card *card, int mtu)
{
	switch (card->info.type) {
	case QETH_CARD_TYPE_OSD:
@@ -2738,7 +2740,7 @@ static void qeth_initialize_working_pool_list(struct qeth_card *card)
	}
}

static inline struct qeth_buffer_pool_entry *qeth_find_free_buffer_pool_entry(
static struct qeth_buffer_pool_entry *qeth_find_free_buffer_pool_entry(
					struct qeth_card *card)
{
	struct list_head *plh;
@@ -2870,7 +2872,7 @@ int qeth_init_qdio_queues(struct qeth_card *card)
}
EXPORT_SYMBOL_GPL(qeth_init_qdio_queues);

static inline __u8 qeth_get_ipa_adp_type(enum qeth_link_types link_type)
static __u8 qeth_get_ipa_adp_type(enum qeth_link_types link_type)
{
	switch (link_type) {
	case QETH_LINK_TYPE_HSTR:
@@ -3888,27 +3890,17 @@ int qeth_hdr_chk_and_bounce(struct sk_buff *skb, struct qeth_hdr **hdr, int len)
}
EXPORT_SYMBOL_GPL(qeth_hdr_chk_and_bounce);

static inline void __qeth_fill_buffer(struct sk_buff *skb,
	struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill,
	int offset)
static void __qeth_fill_buffer(struct sk_buff *skb,
			       struct qeth_qdio_out_buffer *buf,
			       bool is_first_elem, unsigned int offset)
{
	int length = skb_headlen(skb);
	int length_here;
	int element;
	char *data;
	int first_lap, cnt;
	struct skb_frag_struct *frag;

	element = *next_element_to_fill;
	data = skb->data;
	first_lap = (is_tso == 0 ? 1 : 0);

	if (offset >= 0) {
		data = skb->data + offset;
		length -= offset;
		first_lap = 0;
	}
	struct qdio_buffer *buffer = buf->buffer;
	int element = buf->next_element_to_fill;
	int length = skb_headlen(skb) - offset;
	char *data = skb->data + offset;
	int length_here, cnt;

	/* map linear part into buffer element(s) */
	while (length > 0) {
		/* length_here is the remaining amount of data in this page */
		length_here = PAGE_SIZE - ((unsigned long) data % PAGE_SIZE);
@@ -3918,34 +3910,28 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb,
		buffer->element[element].addr = data;
		buffer->element[element].length = length_here;
		length -= length_here;
		if (!length) {
			if (first_lap)
				if (skb_shinfo(skb)->nr_frags)
		if (is_first_elem) {
			is_first_elem = false;
			if (length || skb_is_nonlinear(skb))
				/* skb needs additional elements */
				buffer->element[element].eflags =
					SBAL_EFLAGS_FIRST_FRAG;
			else
				buffer->element[element].eflags = 0;
			else
				buffer->element[element].eflags =
				    SBAL_EFLAGS_MIDDLE_FRAG;
		} else {
			if (first_lap)
				buffer->element[element].eflags =
				    SBAL_EFLAGS_FIRST_FRAG;
			else
			buffer->element[element].eflags =
				SBAL_EFLAGS_MIDDLE_FRAG;
		}
		data += length_here;
		element++;
		first_lap = 0;
	}

	/* map page frags into buffer element(s) */
	for (cnt = 0; cnt < skb_shinfo(skb)->nr_frags; cnt++) {
		frag = &skb_shinfo(skb)->frags[cnt];
		data = (char *)page_to_phys(skb_frag_page(frag)) +
			frag->page_offset;
		length = frag->size;
		skb_frag_t *frag = &skb_shinfo(skb)->frags[cnt];

		data = skb_frag_address(frag);
		length = skb_frag_size(frag);
		while (length > 0) {
			length_here = PAGE_SIZE -
				((unsigned long) data % PAGE_SIZE);
@@ -3964,23 +3950,25 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb,

	if (buffer->element[element - 1].eflags)
		buffer->element[element - 1].eflags = SBAL_EFLAGS_LAST_FRAG;
	*next_element_to_fill = element;
	buf->next_element_to_fill = element;
}

static inline int qeth_fill_buffer(struct qeth_qdio_out_q *queue,
		struct qeth_qdio_out_buffer *buf, struct sk_buff *skb,
		struct qeth_hdr *hdr, int offset, int hd_len)
static int qeth_fill_buffer(struct qeth_qdio_out_q *queue,
			    struct qeth_qdio_out_buffer *buf,
			    struct sk_buff *skb, struct qeth_hdr *hdr,
			    unsigned int offset, int hd_len)
{
	struct qdio_buffer *buffer;
	int flush_cnt = 0, hdr_len, large_send = 0;
	int flush_cnt = 0, hdr_len;
	bool is_first_elem = true;

	buffer = buf->buffer;
	refcount_inc(&skb->users);
	skb_queue_tail(&buf->skb_list, skb);

	/*check first on TSO ....*/
	if (hdr->hdr.l3.id == QETH_HEADER_TYPE_TSO) {
		int element = buf->next_element_to_fill;
		is_first_elem = false;

		hdr_len = sizeof(struct qeth_hdr_tso) +
			((struct qeth_hdr_tso *)hdr)->ext.dg_hdr_len;
@@ -3989,13 +3977,14 @@ static inline int qeth_fill_buffer(struct qeth_qdio_out_q *queue,
		buffer->element[element].length = hdr_len;
		buffer->element[element].eflags = SBAL_EFLAGS_FIRST_FRAG;
		buf->next_element_to_fill++;
		skb->data += hdr_len;
		skb->len  -= hdr_len;
		large_send = 1;
		skb_pull(skb, hdr_len);
	}

	if (offset >= 0) {
	/* IQD */
	if (offset > 0) {
		int element = buf->next_element_to_fill;
		is_first_elem = false;

		buffer->element[element].addr = hdr;
		buffer->element[element].length = sizeof(struct qeth_hdr) +
							hd_len;
@@ -4004,8 +3993,7 @@ static inline int qeth_fill_buffer(struct qeth_qdio_out_q *queue,
		buf->next_element_to_fill++;
	}

	__qeth_fill_buffer(skb, buffer, large_send,
		(int *)&buf->next_element_to_fill, offset);
	__qeth_fill_buffer(skb, buf, is_first_elem, offset);

	if (!queue->do_pack) {
		QETH_CARD_TEXT(queue->card, 6, "fillbfnp");
@@ -4031,7 +4019,8 @@ static inline int qeth_fill_buffer(struct qeth_qdio_out_q *queue,

int qeth_do_send_packet_fast(struct qeth_card *card,
			     struct qeth_qdio_out_q *queue, struct sk_buff *skb,
		struct qeth_hdr *hdr, int offset, int hd_len)
			     struct qeth_hdr *hdr, unsigned int offset,
			     int hd_len)
{
	struct qeth_qdio_out_buffer *buffer;
	int index;
@@ -4111,7 +4100,7 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
			}
		}
	}
	tmp = qeth_fill_buffer(queue, buffer, skb, hdr, -1, 0);
	tmp = qeth_fill_buffer(queue, buffer, skb, hdr, 0, 0);
	queue->next_buf_to_fill = (queue->next_buf_to_fill + tmp) %
				  QDIO_MAX_BUFFERS_PER_Q;
	flush_count += tmp;
@@ -4834,7 +4823,7 @@ int qeth_vm_request_mac(struct qeth_card *card)
}
EXPORT_SYMBOL_GPL(qeth_vm_request_mac);

static inline int qeth_get_qdio_q_format(struct qeth_card *card)
static int qeth_get_qdio_q_format(struct qeth_card *card)
{
	if (card->info.type == QETH_CARD_TYPE_IQD)
		return QDIO_IQDIO_QFMT;
@@ -4899,9 +4888,12 @@ static void qeth_determine_capabilities(struct qeth_card *card)
	return;
}

static inline void qeth_qdio_establish_cq(struct qeth_card *card,
static void qeth_qdio_establish_cq(struct qeth_card *card,
				   struct qdio_buffer **in_sbal_ptrs,
	void (**queue_start_poll) (struct ccw_device *, int, unsigned long)) {
				   void (**queue_start_poll)
					(struct ccw_device *, int,
					 unsigned long))
{
	int i;

	if (card->options.cq == QETH_CQ_ENABLED) {
@@ -5193,9 +5185,10 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
}
EXPORT_SYMBOL_GPL(qeth_core_hardsetup_card);

static inline int qeth_create_skb_frag(struct qeth_qdio_buffer *qethbuffer,
static int qeth_create_skb_frag(struct qeth_qdio_buffer *qethbuffer,
				struct qdio_buffer_element *element,
		struct sk_buff **pskb, int offset, int *pfrag, int data_len)
				struct sk_buff **pskb, int offset, int *pfrag,
				int data_len)
{
	struct page *page = virt_to_page(element->addr);
	if (*pskb == NULL) {
Loading