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

Merge branch 's390-net-next'



Julian Wiedmann says:

====================
s390/net: updates 2019-08-20

please apply the following patches to net-next. This series brings a mix
of cleanups and small improvements for various parts of qeth's control
path. Also, a minor cleanup for ctcm and lcs.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d9bd6d27 0506d5ba
Loading
Loading
Loading
Loading
+16 −26
Original line number Diff line number Diff line
@@ -307,8 +307,7 @@ static void chx_txdone(fsm_instance *fi, int event, void *arg)
		ch->ccw[1].count = ch->trans_skb->len;
		fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
		ch->prof.send_stamp = jiffies;
		rc = ccw_device_start(ch->cdev, &ch->ccw[0],
						(unsigned long)ch, 0xff, 0);
		rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
		ch->prof.doios_multi++;
		if (rc != 0) {
			priv->stats.tx_dropped += i;
@@ -417,8 +416,7 @@ static void chx_rx(fsm_instance *fi, int event, void *arg)
	if (ctcm_checkalloc_buffer(ch))
		return;
	ch->ccw[1].count = ch->max_bufsize;
	rc = ccw_device_start(ch->cdev, &ch->ccw[0],
					(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
	if (rc != 0)
		ctcm_ccw_check_rc(ch, rc, "normal RX");
}
@@ -478,8 +476,7 @@ static void chx_firstio(fsm_instance *fi, int event, void *arg)

	fsm_newstate(fi, (CHANNEL_DIRECTION(ch->flags) == CTCM_READ)
		     ? CTC_STATE_RXINIT : CTC_STATE_TXINIT);
	rc = ccw_device_start(ch->cdev, &ch->ccw[0],
					(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
	if (rc != 0) {
		fsm_deltimer(&ch->timer);
		fsm_newstate(fi, CTC_STATE_SETUPWAIT);
@@ -527,8 +524,7 @@ static void chx_rxidle(fsm_instance *fi, int event, void *arg)
			return;
		ch->ccw[1].count = ch->max_bufsize;
		fsm_newstate(fi, CTC_STATE_RXIDLE);
		rc = ccw_device_start(ch->cdev, &ch->ccw[0],
						(unsigned long)ch, 0xff, 0);
		rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
		if (rc != 0) {
			fsm_newstate(fi, CTC_STATE_RXINIT);
			ctcm_ccw_check_rc(ch, rc, "initial RX");
@@ -571,8 +567,7 @@ static void ctcm_chx_setmode(fsm_instance *fi, int event, void *arg)
			/* Such conditional locking is undeterministic in
			 * static view. => ignore sparse warnings here. */

	rc = ccw_device_start(ch->cdev, &ch->ccw[6],
					(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[6], 0, 0xff, 0);
	if (event == CTC_EVENT_TIMER)	/* see above comments */
		spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
	if (rc != 0) {
@@ -637,7 +632,7 @@ static void ctcm_chx_start(fsm_instance *fi, int event, void *arg)
	fsm_newstate(fi, CTC_STATE_STARTWAIT);
	fsm_addtimer(&ch->timer, 1000, CTC_EVENT_TIMER, ch);
	spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
	rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
	rc = ccw_device_halt(ch->cdev, 0);
	spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
	if (rc != 0) {
		if (rc != -EBUSY)
@@ -672,7 +667,7 @@ static void ctcm_chx_haltio(fsm_instance *fi, int event, void *arg)
			 * static view. => ignore sparse warnings here. */
	oldstate = fsm_getstate(fi);
	fsm_newstate(fi, CTC_STATE_TERM);
	rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
	rc = ccw_device_halt(ch->cdev, 0);

	if (event == CTC_EVENT_STOP)
		spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
@@ -799,7 +794,7 @@ static void ctcm_chx_setuperr(fsm_instance *fi, int event, void *arg)
		fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
		if (!IS_MPC(ch) &&
		    (CHANNEL_DIRECTION(ch->flags) == CTCM_READ)) {
			int rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
			int rc = ccw_device_halt(ch->cdev, 0);
			if (rc != 0)
				ctcm_ccw_check_rc(ch, rc,
					"HaltIO in chx_setuperr");
@@ -851,7 +846,7 @@ static void ctcm_chx_restart(fsm_instance *fi, int event, void *arg)
			/* Such conditional locking is a known problem for
			 * sparse because its undeterministic in static view.
			 * Warnings should be ignored here. */
	rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
	rc = ccw_device_halt(ch->cdev, 0);
	if (event == CTC_EVENT_TIMER)
		spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
	if (rc != 0) {
@@ -947,8 +942,8 @@ static void ctcm_chx_rxdisc(fsm_instance *fi, int event, void *arg)
	ch2 = priv->channel[CTCM_WRITE];
	fsm_newstate(ch2->fsm, CTC_STATE_DTERM);

	ccw_device_halt(ch->cdev, (unsigned long)ch);
	ccw_device_halt(ch2->cdev, (unsigned long)ch2);
	ccw_device_halt(ch->cdev, 0);
	ccw_device_halt(ch2->cdev, 0);
}

/**
@@ -1041,8 +1036,7 @@ static void ctcm_chx_txretry(fsm_instance *fi, int event, void *arg)
			ctcmpc_dumpit((char *)&ch->ccw[3],
					sizeof(struct ccw1) * 3);

		rc = ccw_device_start(ch->cdev, &ch->ccw[3],
						(unsigned long)ch, 0xff, 0);
		rc = ccw_device_start(ch->cdev, &ch->ccw[3], 0, 0xff, 0);
		if (event == CTC_EVENT_TIMER)
			spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev),
					saveflags);
@@ -1361,8 +1355,7 @@ static void ctcmpc_chx_txdone(fsm_instance *fi, int event, void *arg)
	ch->prof.send_stamp = jiffies;
	if (do_debug_ccw)
		ctcmpc_dumpit((char *)&ch->ccw[0], sizeof(struct ccw1) * 3);
	rc = ccw_device_start(ch->cdev, &ch->ccw[0],
					(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
	ch->prof.doios_multi++;
	if (rc != 0) {
		priv->stats.tx_dropped += i;
@@ -1462,8 +1455,7 @@ again:
		if (dolock)
			spin_lock_irqsave(
				get_ccwdev_lock(ch->cdev), saveflags);
		rc = ccw_device_start(ch->cdev, &ch->ccw[0],
						(unsigned long)ch, 0xff, 0);
		rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
		if (dolock) /* see remark about conditional locking */
			spin_unlock_irqrestore(
				get_ccwdev_lock(ch->cdev), saveflags);
@@ -1569,8 +1561,7 @@ void ctcmpc_chx_rxidle(fsm_instance *fi, int event, void *arg)
		if (event == CTC_EVENT_START)
			/* see remark about conditional locking */
			spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
		rc = ccw_device_start(ch->cdev, &ch->ccw[0],
						(unsigned long)ch, 0xff, 0);
		rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
		if (event == CTC_EVENT_START)
			spin_unlock_irqrestore(
					get_ccwdev_lock(ch->cdev), saveflags);
@@ -1825,8 +1816,7 @@ static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg)

	spin_lock_irqsave(get_ccwdev_lock(wch->cdev), saveflags);
	wch->prof.send_stamp = jiffies;
	rc = ccw_device_start(wch->cdev, &wch->ccw[3],
					(unsigned long) wch, 0xff, 0);
	rc = ccw_device_start(wch->cdev, &wch->ccw[3], 0, 0xff, 0);
	spin_unlock_irqrestore(get_ccwdev_lock(wch->cdev), saveflags);

	if ((grp->sweep_req_pend_num == 0) &&
+2 −4
Original line number Diff line number Diff line
@@ -569,8 +569,7 @@ static int ctcm_transmit_skb(struct channel *ch, struct sk_buff *skb)
	fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
	spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
	ch->prof.send_stamp = jiffies;
	rc = ccw_device_start(ch->cdev, &ch->ccw[ccw_idx],
					(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[ccw_idx], 0, 0xff, 0);
	spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
	if (ccw_idx == 3)
		ch->prof.doios_single++;
@@ -833,8 +832,7 @@ static int ctcmpc_transmit_skb(struct channel *ch, struct sk_buff *skb)

	spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
	ch->prof.send_stamp = jiffies;
	rc = ccw_device_start(ch->cdev, &ch->ccw[ccw_idx],
					(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[ccw_idx], 0, 0xff, 0);
	spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
	if (ccw_idx == 3)
		ch->prof.doios_single++;
+2 −4
Original line number Diff line number Diff line
@@ -1523,8 +1523,7 @@ void mpc_action_send_discontact(unsigned long thischan)
	unsigned long	saveflags = 0;

	spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
	rc = ccw_device_start(ch->cdev, &ch->ccw[15],
					(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[15], 0, 0xff, 0);
	spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);

	if (rc != 0) {
@@ -1797,8 +1796,7 @@ static void mpc_action_side_xid(fsm_instance *fsm, void *arg, int side)
	}

	fsm_addtimer(&ch->timer, 5000 , CTC_EVENT_TIMER, ch);
	rc = ccw_device_start(ch->cdev, &ch->ccw[8],
				(unsigned long)ch, 0xff, 0);
	rc = ccw_device_start(ch->cdev, &ch->ccw[8], 0, 0xff, 0);

	if (gotlock)	/* see remark above about conditional locking */
		spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
+3 −3
Original line number Diff line number Diff line
@@ -504,7 +504,7 @@ lcs_clear_channel(struct lcs_channel *channel)
	LCS_DBF_TEXT(4,trace,"clearch");
	LCS_DBF_TEXT_(4, trace, "%s", dev_name(&channel->ccwdev->dev));
	spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
	rc = ccw_device_clear(channel->ccwdev, (addr_t) channel);
	rc = ccw_device_clear(channel->ccwdev, 0);
	spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
	if (rc) {
		LCS_DBF_TEXT_(4, trace, "ecsc%s",
@@ -532,7 +532,7 @@ lcs_stop_channel(struct lcs_channel *channel)
	LCS_DBF_TEXT_(4, trace, "%s", dev_name(&channel->ccwdev->dev));
	channel->state = LCS_CH_STATE_INIT;
	spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
	rc = ccw_device_halt(channel->ccwdev, (addr_t) channel);
	rc = ccw_device_halt(channel->ccwdev, 0);
	spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
	if (rc) {
		LCS_DBF_TEXT_(4, trace, "ehsc%s",
@@ -1427,7 +1427,7 @@ lcs_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
		channel->state = LCS_CH_STATE_SUSPENDED;
	if (irb->scsw.cmd.fctl & SCSW_FCTL_HALT_FUNC) {
		if (irb->scsw.cmd.cc != 0) {
			ccw_device_halt(channel->ccwdev, (addr_t) channel);
			ccw_device_halt(channel->ccwdev, 0);
			return;
		}
		/* The channel has been stopped by halt_IO. */
+17 −19
Original line number Diff line number Diff line
@@ -572,15 +572,26 @@ struct qeth_channel {
	atomic_t irq_pending;
};

struct qeth_reply {
	int (*callback)(struct qeth_card *card, struct qeth_reply *reply,
			unsigned long data);
	void *param;
};

struct qeth_cmd_buffer {
	struct list_head list;
	struct completion done;
	spinlock_t lock;
	unsigned int length;
	refcount_t ref_count;
	struct qeth_channel *channel;
	struct qeth_reply *reply;
	struct qeth_reply reply;
	long timeout;
	unsigned char *data;
	void (*finalize)(struct qeth_card *card, struct qeth_cmd_buffer *iob);
	void (*callback)(struct qeth_card *card, struct qeth_cmd_buffer *iob);
	void (*callback)(struct qeth_card *card, struct qeth_cmd_buffer *iob,
			 unsigned int data_length);
	int rc;
};

static inline void qeth_get_cmd(struct qeth_cmd_buffer *iob)
@@ -626,19 +637,6 @@ struct qeth_seqno {
	__u16 ipa;
};

struct qeth_reply {
	struct list_head list;
	struct completion received;
	spinlock_t lock;
	int (*callback)(struct qeth_card *, struct qeth_reply *,
		unsigned long);
	u32 seqno;
	unsigned long offset;
	int rc;
	void *param;
	refcount_t refcnt;
};

struct qeth_card_blkt {
	int time_total;
	int inter_packet;
@@ -651,10 +649,11 @@ struct qeth_card_blkt {
struct qeth_card_info {
	unsigned short unit_addr2;
	unsigned short cula;
	unsigned short chpid;
	u8 chpid;
	__u16 func_level;
	char mcl_level[QETH_MCL_LENGTH + 1];
	u8 open_when_online:1;
	u8 promisc_mode:1;
	u8 use_v1_blkt:1;
	u8 is_vm_nic:1;
	int mac_bits;
@@ -664,7 +663,6 @@ struct qeth_card_info {
	int unique_id;
	bool layer_enforced;
	struct qeth_card_blkt blkt;
	enum qeth_ipa_promisc_modes promisc_mode;
	__u32 diagass_support;
	__u32 hwtrap;
};
@@ -994,6 +992,7 @@ struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card,
struct qeth_cmd_buffer *qeth_get_diag_cmd(struct qeth_card *card,
					  enum qeth_diags_cmds sub_cmd,
					  unsigned int data_length);
void qeth_notify_cmd(struct qeth_cmd_buffer *iob, int reason);
void qeth_put_cmd(struct qeth_cmd_buffer *iob);

struct sk_buff *qeth_core_get_next_skb(struct qeth_card *,
@@ -1005,10 +1004,9 @@ void qeth_clear_ipacmd_list(struct qeth_card *);
int qeth_qdio_clear_card(struct qeth_card *, int);
void qeth_clear_working_pool_list(struct qeth_card *);
void qeth_drain_output_queues(struct qeth_card *card);
void qeth_setadp_promisc_mode(struct qeth_card *);
void qeth_setadp_promisc_mode(struct qeth_card *card, bool enable);
int qeth_setadpparms_change_macaddr(struct qeth_card *);
void qeth_tx_timeout(struct net_device *);
void qeth_notify_reply(struct qeth_reply *reply, int reason);
void qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
			  u16 cmd_length);
int qeth_query_switch_attributes(struct qeth_card *card,
Loading