Commit 6656ba75 authored by Paolo Abeni's avatar Paolo Abeni
Browse files

Merge branch 's390-net-updates-2023-06-10'

Alexandra Winter says:

====================
s390/net: updates 2023-06-10

Please apply the following patch series for s390's ctcm and lcs drivers
to netdev's net-next tree.

Just maintenance patches, no functional changes.
====================

Link: https://lore.kernel.org/r/20230621134921.904217-1-wintera@linux.ibm.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents ebe14dad 1471d85f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ void ctcm_dbf_longtext(enum ctcm_dbf_names dbf_nix, int level, char *fmt, ...)
	if (!debug_level_enabled(ctcm_dbf[dbf_nix].id, level))
		return;
	va_start(args, fmt);
	vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args);
	vscnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args);
	va_end(args);

	debug_text_event(ctcm_dbf[dbf_nix].id, level, dbf_txt_buf);
+3 −3
Original line number Diff line number Diff line
@@ -1333,7 +1333,7 @@ static int add_channel(struct ccw_device *cdev, enum ctcm_channel_types type,
					goto nomem_return;

	ch->cdev = cdev;
	snprintf(ch->id, CTCM_ID_SIZE, "ch-%s", dev_name(&cdev->dev));
	scnprintf(ch->id, CTCM_ID_SIZE, "ch-%s", dev_name(&cdev->dev));
	ch->type = type;

	/*
@@ -1498,8 +1498,8 @@ static int ctcm_new_device(struct ccwgroup_device *cgdev)

	type = get_channel_type(&cdev0->id);

	snprintf(read_id, CTCM_ID_SIZE, "ch-%s", dev_name(&cdev0->dev));
	snprintf(write_id, CTCM_ID_SIZE, "ch-%s", dev_name(&cdev1->dev));
	scnprintf(read_id, CTCM_ID_SIZE, "ch-%s", dev_name(&cdev0->dev));
	scnprintf(write_id, CTCM_ID_SIZE, "ch-%s", dev_name(&cdev1->dev));

	ret = add_channel(cdev0, type, priv);
	if (ret) {
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ enum ctcm_channel_types {
#define CTCM_PROTO_MPC		4
#define CTCM_PROTO_MAX		4

#define CTCM_STATSIZE_LIMIT	64
#define CTCM_BUFSIZE_LIMIT	65535
#define CTCM_BUFSIZE_DEFAULT	32768
#define MPC_BUFSIZE_DEFAULT	CTCM_BUFSIZE_LIMIT
+10 −8
Original line number Diff line number Diff line
@@ -144,9 +144,9 @@ void ctcmpc_dumpit(char *buf, int len)

	for (ct = 0; ct < len; ct++, ptr++, rptr++) {
		if (sw == 0) {
			sprintf(addr, "%16.16llx", (__u64)rptr);
			scnprintf(addr, sizeof(addr), "%16.16llx", (__u64)rptr);

			sprintf(boff, "%4.4X", (__u32)ct);
			scnprintf(boff, sizeof(boff), "%4.4X", (__u32)ct);
			bhex[0] = '\0';
			basc[0] = '\0';
		}
@@ -155,7 +155,7 @@ void ctcmpc_dumpit(char *buf, int len)
		if (sw == 8)
			strcat(bhex, "	");

		sprintf(tbuf, "%2.2llX", (__u64)*ptr);
		scnprintf(tbuf, sizeof(tbuf), "%2.2llX", (__u64)*ptr);

		tbuf[2] = '\0';
		strcat(bhex, tbuf);
@@ -171,7 +171,7 @@ void ctcmpc_dumpit(char *buf, int len)
			continue;
		if ((strcmp(duphex, bhex)) != 0) {
			if (dup != 0) {
				sprintf(tdup,
				scnprintf(tdup, sizeof(tdup),
					  "Duplicate as above to %s", addr);
				ctcm_pr_debug("		       --- %s ---\n",
						tdup);
@@ -197,14 +197,16 @@ void ctcmpc_dumpit(char *buf, int len)
			strcat(basc, " ");
		}
		if (dup != 0) {
			sprintf(tdup, "Duplicate as above to %s", addr);
			scnprintf(tdup, sizeof(tdup),
				  "Duplicate as above to %s", addr);
			ctcm_pr_debug("		       --- %s ---\n", tdup);
		}
		ctcm_pr_debug("   %s (+%s) : %s  [%s]\n",
					addr, boff, bhex, basc);
	} else {
		if (dup >= 1) {
			sprintf(tdup, "Duplicate as above to %s", addr);
			scnprintf(tdup, sizeof(tdup),
				  "Duplicate as above to %s", addr);
			ctcm_pr_debug("		       --- %s ---\n", tdup);
		}
		if (dup != 0) {
@@ -291,7 +293,7 @@ static struct net_device *ctcmpc_get_dev(int port_num)
	struct net_device *dev;
	struct ctcm_priv *priv;

	sprintf(device, "%s%i", MPC_DEVICE_NAME, port_num);
	scnprintf(device, sizeof(device), "%s%i", MPC_DEVICE_NAME, port_num);

	dev = __dev_get_by_name(&init_net, device);

+23 −23
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ static ssize_t ctcm_buffer_show(struct device *dev,

	if (!priv)
		return -ENODEV;
	return sprintf(buf, "%d\n", priv->buffer_size);
	return sysfs_emit(buf, "%d\n", priv->buffer_size);
}

static ssize_t ctcm_buffer_write(struct device *dev,
@@ -86,23 +86,23 @@ static void ctcm_print_statistics(struct ctcm_priv *priv)
		return;
	p = sbuf;

	p += sprintf(p, "  Device FSM state: %s\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  Device FSM state: %s\n",
		       fsm_getstate_str(priv->fsm));
	p += sprintf(p, "  RX channel FSM state: %s\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  RX channel FSM state: %s\n",
		       fsm_getstate_str(priv->channel[CTCM_READ]->fsm));
	p += sprintf(p, "  TX channel FSM state: %s\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  TX channel FSM state: %s\n",
		       fsm_getstate_str(priv->channel[CTCM_WRITE]->fsm));
	p += sprintf(p, "  Max. TX buffer used: %ld\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  Max. TX buffer used: %ld\n",
		       priv->channel[WRITE]->prof.maxmulti);
	p += sprintf(p, "  Max. chained SKBs: %ld\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  Max. chained SKBs: %ld\n",
		       priv->channel[WRITE]->prof.maxcqueue);
	p += sprintf(p, "  TX single write ops: %ld\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  TX single write ops: %ld\n",
		       priv->channel[WRITE]->prof.doios_single);
	p += sprintf(p, "  TX multi write ops: %ld\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  TX multi write ops: %ld\n",
		       priv->channel[WRITE]->prof.doios_multi);
	p += sprintf(p, "  Netto bytes written: %ld\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  Netto bytes written: %ld\n",
		       priv->channel[WRITE]->prof.txlen);
	p += sprintf(p, "  Max. TX IO-time: %u\n",
	p += scnprintf(p, CTCM_STATSIZE_LIMIT, "  Max. TX IO-time: %u\n",
		       jiffies_to_usecs(priv->channel[WRITE]->prof.tx_time));

	printk(KERN_INFO "Statistics for %s:\n%s",
@@ -120,7 +120,7 @@ static ssize_t stats_show(struct device *dev,
	if (!priv || gdev->state != CCWGROUP_ONLINE)
		return -ENODEV;
	ctcm_print_statistics(priv);
	return sprintf(buf, "0\n");
	return sysfs_emit(buf, "0\n");
}

static ssize_t stats_write(struct device *dev, struct device_attribute *attr,
@@ -142,7 +142,7 @@ static ssize_t ctcm_proto_show(struct device *dev,
	if (!priv)
		return -ENODEV;

	return sprintf(buf, "%d\n", priv->protocol);
	return sysfs_emit(buf, "%d\n", priv->protocol);
}

static ssize_t ctcm_proto_store(struct device *dev,
@@ -184,7 +184,7 @@ static ssize_t ctcm_type_show(struct device *dev,
	if (!cgdev)
		return -ENODEV;

	return sprintf(buf, "%s\n",
	return sysfs_emit(buf, "%s\n",
			  ctcm_type[cgdev->cdev[0]->id.driver_info]);
}

Loading