Skip to contentSkip to conversation

s390: network patches for net-next

PATCH In review [email protected] 4 participants 7 messages Jan 14, 2014 – Jan 27, 2014

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover s390: network patches for net-next

Hi Dave,

here are some s390 related patches for net-next

shortlog:

Eugene Crosser (3)
qeth: bridgeport support - basic control

390/qdio: bridgeport support - CHSC part
Since this patch touches CIO and qdio it will come in again with the s390 tree from Martin Schwidefsky.

qeth: bridgeport support - address notifications

Thanks,
Frank

#1 lore raw

PATCH 1/3 qeth: bridgeport support - basic control

From: Eugene Crosser <[email protected]>

Introduce functions to assign roles and check state of bridgeport-capable HiperSocket devices, and sysfs attributes providing access to these functions from userspace. Introduce udev events emitted when the state of a bridgeport device changes.

---
 Documentation/s390/qeth.txt       |  21 +++
 drivers/s390/net/Makefile         |   2 +-
 drivers/s390/net/qeth_core.h      |  25 +++
 drivers/s390/net/qeth_core_main.c |  14 +-
 drivers/s390/net/qeth_core_mpc.c  |   1 +
 drivers/s390/net/qeth_core_mpc.h  |  84 +++++++++
 drivers/s390/net/qeth_l2.h        |  15 ++
 drivers/s390/net/qeth_l2_main.c   | 364 ++++++++++++++++++++++++++++++++++++++
 drivers/s390/net/qeth_l2_sys.c    | 161 +++++++++++++++++
 9 files changed, 685 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/s390/qeth.txt
 create mode 100644 drivers/s390/net/qeth_l2.h
 create mode 100644 drivers/s390/net/qeth_l2_sys.c
Documentation/s390/qeth.txt new file +21 -0
new file mode 100644
index 0000000..c08c305
@@ -0,0 +1,21 @@
+IBM s390 QDIO Ethernet Driver
+
+HiperSockets Bridge Port Support
+
+Uevents
+
+To generate the events the device must be assigned a role of either
+a primary or a secondary Bridge Port. For more information, see
+"z/VM Connectivity, SC24-6174".
+
+When run on HiperSockets Bridge Capable Port hardware, and the state
+of some configured Bridge Port device on the channel changes, a udev
+event with ACTION=CHANGE is emitted on behalf of the corresponding
+ccwgroup device. The event has the following attributes:
+
+BRIDGEPORT=statechange -  indicates that the Bridge Port device changed
+  its state.
+
+ROLE={primary|secondary|none} - the role assigned to the port.
+
+STATE={active|standby|inactive} - the newly assumed state of the port.
drivers/s390/net/Makefile +1 -1
index 4dfe8c1..d28f05d 100644
@@ -11,7 +11,7 @@ obj-$(CONFIG_LCS) += lcs.o
 obj-$(CONFIG_CLAW) += claw.o
 qeth-y += qeth_core_sys.o qeth_core_main.o qeth_core_mpc.o
 obj-$(CONFIG_QETH) += qeth.o
-qeth_l2-y += qeth_l2_main.o
+qeth_l2-y += qeth_l2_main.o qeth_l2_sys.o
 obj-$(CONFIG_QETH_L2) += qeth_l2.o
 qeth_l3-y += qeth_l3_main.o qeth_l3_sys.o
 obj-$(CONFIG_QETH_L3) += qeth_l3.o
drivers/s390/net/qeth_core.h +25 -0
index d45427c..010f49e 100644
@@ -156,6 +156,24 @@ struct qeth_ipa_info {
 	__u32 enabled_funcs;
 };
 
+/* SETBRIDGEPORT stuff */
+enum qeth_sbp_roles {
+	QETH_SBP_ROLE_NONE	= 0,
+	QETH_SBP_ROLE_PRIMARY	= 1,
+	QETH_SBP_ROLE_SECONDARY	= 2,
+};
+
+enum qeth_sbp_states {
+	QETH_SBP_STATE_INACTIVE	= 0,
+	QETH_SBP_STATE_STANDBY	= 1,
+	QETH_SBP_STATE_ACTIVE	= 2,
+};
+
+struct qeth_sbp_info {
+	__u32 supported_funcs;
+	enum qeth_sbp_roles role;
+};
+
 static inline int qeth_is_ipa_supported(struct qeth_ipa_info *ipa,
 		enum qeth_ipa_funcs func)
 {
@@ -672,6 +690,7 @@ struct qeth_card_options {
 	struct qeth_ipa_info adp; /*Adapter parameters*/
 	struct qeth_routing_info route6;
 	struct qeth_ipa_info ipa6;
+	struct qeth_sbp_info sbp; /* SETBRIDGEPORT options */
 	int fake_broadcast;
 	int add_hhlen;
 	int layer2;
@@ -857,6 +876,7 @@ extern struct qeth_discipline qeth_l2_discipline;
 extern struct qeth_discipline qeth_l3_discipline;
 extern const struct attribute_group *qeth_generic_attr_groups[];
 extern const struct attribute_group *qeth_osn_attr_groups[];
+extern struct workqueue_struct *qeth_wq;
 
 const char *qeth_get_cardname_short(struct qeth_card *);
 int qeth_realloc_buffer_pool(struct qeth_card *, int);
@@ -925,6 +945,11 @@ int qeth_query_card_info(struct qeth_card *card,
 int qeth_send_control_data(struct qeth_card *, int, struct qeth_cmd_buffer *,
 	int (*reply_cb)(struct qeth_card *, struct qeth_reply*, unsigned long),
 	void *reply_param);
+void qeth_bridge_state_change(struct qeth_card *card, struct qeth_ipa_cmd *cmd);
+void qeth_bridgeport_query_support(struct qeth_card *card);
+int qeth_bridgeport_query_ports(struct qeth_card *card,
+	enum qeth_sbp_roles *role, enum qeth_sbp_states *state);
+int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role);
 int qeth_get_priority_queue(struct qeth_card *, struct sk_buff *, int, int);
 int qeth_get_elements_no(struct qeth_card *, struct sk_buff *, int);
 int qeth_get_elements_for_frags(struct sk_buff *);
drivers/s390/net/qeth_core_main.c +13 -1
index d4d5466..ed66bde 100644
@@ -68,7 +68,7 @@ static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
 		enum qeth_qdio_buffer_states newbufstate);
 static int qeth_init_qdio_out_buf(struct qeth_qdio_out_q *, int);
 
-static struct workqueue_struct *qeth_wq;
+struct workqueue_struct *qeth_wq;
 
 static void qeth_close_dev_handler(struct work_struct *work)
 {
@@ -615,6 +615,13 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,
 					card->info.hwtrap = 2;
 				qeth_schedule_recovery(card);
 				return NULL;
+			case IPA_CMD_SETBRIDGEPORT:
+				if (cmd->data.sbp.hdr.command_code ==
+					IPA_SBP_BRIDGE_PORT_STATE_CHANGE) {
+					qeth_bridge_state_change(card, cmd);
+					return NULL;
+				} else
+					return cmd;
 			case IPA_CMD_MODCCID:
 				return cmd;
 			case IPA_CMD_REGISTER_LOCAL_ADDR:
@@ -4956,12 +4963,17 @@ retriable:
 
 	card->options.ipa4.supported_funcs = 0;
 	card->options.adp.supported_funcs = 0;
+	card->options.sbp.supported_funcs = 0;
 	card->info.diagass_support = 0;
 	qeth_query_ipassists(card, QETH_PROT_IPV4);
 	if (qeth_is_supported(card, IPA_SETADAPTERPARMS))
 		qeth_query_setadapterparms(card);
 	if (qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST))
 		qeth_query_setdiagass(card);
+	qeth_bridgeport_query_support(card);
+	if (card->options.sbp.supported_funcs)
+		dev_info(&card->gdev->dev,
+		"The device represents a HiperSockets Bridge Capable Port\n");
 	return 0;
 out:
 	dev_warn(&card->gdev->dev, "The qeth device driver failed to recover "
drivers/s390/net/qeth_core_mpc.c +1 -0
index 06c5578..2f44cfd 100644
@@ -249,6 +249,7 @@ static struct ipa_cmd_names qeth_ipa_cmd_names[] = {
 	{IPA_CMD_DELIP,		"delip"},
 	{IPA_CMD_SETADAPTERPARMS, "setadapterparms"},
 	{IPA_CMD_SET_DIAG_ASS,	"set_diag_ass"},
+	{IPA_CMD_SETBRIDGEPORT,	"set_bridge_port"},
 	{IPA_CMD_CREATE_ADDR,	"create_addr"},
 	{IPA_CMD_DESTROY_ADDR,	"destroy_addr"},
 	{IPA_CMD_REGISTER_LOCAL_ADDR,	"register_local_addr"},
drivers/s390/net/qeth_core_mpc.h +84 -0

102 lines not on this page · raw message

drivers/s390/net/qeth_l2.h new file +15 -0
new file mode 100644
index 0000000..0767556
@@ -0,0 +1,15 @@
+/*
+ *    Copyright IBM Corp. 2013
+ *    Author(s): Eugene Crosser <[email protected]>
+ */
+
+#ifndef __QETH_L2_H__
+#define __QETH_L2_H__
+
+#include "qeth_core.h"
+
+int qeth_l2_create_device_attributes(struct device *);
+void qeth_l2_remove_device_attributes(struct device *);
+void qeth_l2_setup_bridgeport_attrs(struct qeth_card *card);
+
+#endif /* __QETH_L2_H__ */
drivers/s390/net/qeth_l2_main.c +364 -0

394 lines not on this page · raw message

drivers/s390/net/qeth_l2_sys.c new file +161 -0

161 lines not on this page · raw message

Reviewed-by Ursula Braun on v1 1/3
#2 lore raw

Re: [patch 1/3] qeth: bridgeport support - basic control

Quoted 10 lines · On Tue, Jan 14, 2014 at 9:54 AM, <[email protected]> wrote:

From: Eugene Crosser <[email protected]>

Introduce functions to assign roles and check state of bridgeport-capable HiperSocket devices, and sysfs attributes providing access to these functions from userspace. Introduce udev events emitted when the state of a bridgeport device changes.

Hi Eugene,

This commit breaks the linux-next builds of s390 allmodconfig:

Bisecting: 0 revisions left to test after this (roughly 0 steps) [b4d72c08b358fc5b259fad0f4971112d949efd1c] qeth: bridgeport support - basic control
running ./x
scripts/kconfig/conf --allmodconfig Kconfig
#

# configuration written to .config
#
ERROR: "qeth_wq" [drivers/s390/net/qeth_l2.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
b4d72c08b358fc5b259fad0f4971112d949efd1c is the first bad commit
commit b4d72c08b358fc5b259fad0f4971112d949efd1c
Author: Eugene Crosser <[email protected]>
Date:   Tue Jan 14 15:54:11 2014 +0100

qeth: bridgeport support - basic control

Introduce functions to assign roles and check state of bridgeport-capable HiperSocket devices, and sysfs attributes providing access to these functions from userspace. Introduce udev events emitted when the state of a bridgeport device changes.

:040000 040000 1eb4205806a03dbc3de37af46e9447168b0d0e2a
0ba638a94d92c41d732bedc54c8108775f689cf3 M Documentation
:040000 040000 9a9eb7da725785bfe40c77cdee4c181c90f74ef3
f7e69854a168599f2f191675b449783292b0a4a1 M drivers
bisect run success

http://kisskb.ellerman.id.au/kisskb/buildresult/10509367/

Paul.
--

Quoted 16 lines
---
 Documentation/s390/qeth.txt       |  21 +++
 drivers/s390/net/Makefile         |   2 +-
 drivers/s390/net/qeth_core.h      |  25 +++
 drivers/s390/net/qeth_core_main.c |  14 +-
 drivers/s390/net/qeth_core_mpc.c  |   1 +
 drivers/s390/net/qeth_core_mpc.h  |  84 +++++++++
 drivers/s390/net/qeth_l2.h        |  15 ++
 drivers/s390/net/qeth_l2_main.c   | 364 ++++++++++++++++++++++++++++++++++++++
 drivers/s390/net/qeth_l2_sys.c    | 161 +++++++++++++++++
 9 files changed, 685 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/s390/qeth.txt
 create mode 100644 drivers/s390/net/qeth_l2.h
 create mode 100644 drivers/s390/net/qeth_l2_sys.c
#3 lore raw

Re: [patch 1/3] qeth: bridgeport support - basic control

Quoted 50 lines · Paul Gortmaker
Quoted 10 lines · On Tue, Jan 14, 2014 at 9:54 AM, <[email protected]> wrote:

From: Eugene Crosser <[email protected]>

Introduce functions to assign roles and check state of bridgeport-capable HiperSocket devices, and sysfs attributes providing access to these functions from userspace. Introduce udev events emitted when the state of a bridgeport device changes.

Hi Eugene,

This commit breaks the linux-next builds of s390 allmodconfig:

Bisecting: 0 revisions left to test after this (roughly 0 steps) [b4d72c08b358fc5b259fad0f4971112d949efd1c] qeth: bridgeport support - basic control
running ./x
scripts/kconfig/conf --allmodconfig Kconfig
#

# configuration written to .config
#
ERROR: "qeth_wq" [drivers/s390/net/qeth_l2.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
b4d72c08b358fc5b259fad0f4971112d949efd1c is the first bad commit
commit b4d72c08b358fc5b259fad0f4971112d949efd1c
Author: Eugene Crosser <[email protected]>
Date:   Tue Jan 14 15:54:11 2014 +0100

qeth: bridgeport support - basic control

Introduce functions to assign roles and check state of bridgeport-capable HiperSocket devices, and sysfs attributes providing access to these functions from userspace. Introduce udev events emitted when the state of a bridgeport device changes.

:040000 040000 1eb4205806a03dbc3de37af46e9447168b0d0e2a
0ba638a94d92c41d732bedc54c8108775f689cf3 M Documentation
:040000 040000 9a9eb7da725785bfe40c77cdee4c181c90f74ef3
f7e69854a168599f2f191675b449783292b0a4a1 M drivers
bisect run success

Quoted 5 lines

http://kisskb.ellerman.id.au/kisskb/buildresult/10509367/

Paul.
--

Paul, thx for this information. We are working on a fix. Hope I can sent it out later this day.

Quoted 21 lines
Quoted 6 lines
---
 Documentation/s390/qeth.txt       |  21 +++
 drivers/s390/net/Makefile         |   2 +-
 drivers/s390/net/qeth_core.h      |  25 +++
 drivers/s390/net/qeth_core_main.c |  14 +-
 drivers/s390/net/qeth_core_mpc.c  |   1 +
Quoted 10 lines
 drivers/s390/net/qeth_core_mpc.h  |  84 +++++++++
 drivers/s390/net/qeth_l2.h        |  15 ++
 drivers/s390/net/qeth_l2_main.c   | 364 ++++++++++++++++++++++++++++++++++++++
 drivers/s390/net/qeth_l2_sys.c    | 161 +++++++++++++++++
 9 files changed, 685 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/s390/qeth.txt
 create mode 100644 drivers/s390/net/qeth_l2.h
 create mode 100644 drivers/s390/net/qeth_l2_sys.c

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

PATCH 2/3 s390/qdio: bridgeport support - CHSC part

In reply to [email protected]

From: Eugene Crosser <[email protected]>

Introduce function for the "Perform network-subchannel operation" CHSC command with operation code "bridgeport information", and bit definitions for "characteristics" pertaning to this command.

---
 arch/s390/include/asm/css_chars.h |    2 
 arch/s390/include/asm/qdio.h      |   33 +++++++++++++
 drivers/s390/cio/chsc.c           |   33 +++++++++++++
 drivers/s390/cio/chsc.h           |   51 ++++++++++++++++++++-
 drivers/s390/cio/qdio_main.c      |   91 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 209 insertions(+), 1 deletion(-)
arch/s390/include/asm/css_chars.h +2 -0
@@ -29,6 +29,8 @@ struct css_general_char {
 	u32 fcx : 1;	 /* bit 88 */
 	u32 : 19;
 	u32 alt_ssi : 1; /* bit 108 */
+	u32:1;
+	u32 narf:1;	 /* bit 110 */
 } __packed;
 
 extern struct css_general_char css_general_characteristics;
arch/s390/include/asm/qdio.h +33 -0
@@ -378,6 +378,34 @@ struct qdio_initialize {
 	struct qdio_outbuf_state *output_sbal_state_array;
 };
 
+/**
+ * enum qdio_brinfo_entry_type - type of address entry for qdio_brinfo_desc()
+ * @l3_ipv6_addr: entry contains IPv6 address
+ * @l3_ipv4_addr: entry contains IPv4 address
+ * @l2_addr_lnid: entry contains MAC address and VLAN ID
+ */
+enum qdio_brinfo_entry_type {l3_ipv6_addr, l3_ipv4_addr, l2_addr_lnid};
+
+/**
+ * struct qdio_brinfo_entry_XXX - Address entry for qdio_brinfo_desc()
+ * @nit:  Network interface token
+ * @addr: Address of one of the three types
+ *
+ * The struct is passed to the callback function by qdio_brinfo_desc()
+ */
+struct qdio_brinfo_entry_l3_ipv6 {
+	u64 nit;
+	struct { unsigned char _s6_addr[16]; } addr;
+} __packed;
+struct qdio_brinfo_entry_l3_ipv4 {
+	u64 nit;
+	struct { uint32_t _s_addr; } addr;
+} __packed;
+struct qdio_brinfo_entry_l2 {
+	u64 nit;
+	struct { u8 mac[6]; u16 lnid; } addr_lnid;
+} __packed;
+
 #define QDIO_STATE_INACTIVE		0x00000002 /* after qdio_cleanup */
 #define QDIO_STATE_ESTABLISHED		0x00000004 /* after qdio_establish */
 #define QDIO_STATE_ACTIVE		0x00000008 /* after qdio_activate */
@@ -399,5 +427,10 @@ extern int qdio_get_next_buffers(struct
 extern int qdio_shutdown(struct ccw_device *, int);
 extern int qdio_free(struct ccw_device *);
 extern int qdio_get_ssqd_desc(struct ccw_device *, struct qdio_ssqd_desc *);
+extern int qdio_pnso_brinfo(struct subchannel_id schid,
+		int cnc, u16 *response,
+		void (*cb)(void *priv, enum qdio_brinfo_entry_type type,
+				void *entry),
+		void *priv);
 
 #endif /* __QDIO_H__ */
drivers/s390/cio/chsc.c +33 -0
@@ -55,6 +55,7 @@ int chsc_error_from_response(int respons
 	case 0x0004:
 		return -EOPNOTSUPP;
 	case 0x000b:
+	case 0x0107:		/* "Channel busy" for the op 0x003d */
 		return -EBUSY;
 	case 0x0100:
 	case 0x0102:
@@ -1234,3 +1235,35 @@ out:
 	return ret;
 }
 EXPORT_SYMBOL_GPL(chsc_scm_info);
+
+/**
+ * chsc_pnso_brinfo() - Perform Network-Subchannel Operation, Bridge Info.
+ * @schid:		id of the subchannel on which PNSO is performed
+ * @brinfo_area:	request and response block for the operation
+ * @resume_token:	resume token for multiblock response
+ * @cnc:		Boolean change-notification control
+ *
+ * brinfo_area must be allocated by the caller with get_zeroed_page(GFP_KERNEL)
+ *
+ * Returns 0 on success.
+ */
+int chsc_pnso_brinfo(struct subchannel_id schid,
+		struct chsc_pnso_area *brinfo_area,
+		struct chsc_brinfo_resume_token resume_token,
+		int cnc)
+{
+	memset(brinfo_area, 0, sizeof(*brinfo_area));
+	brinfo_area->request.length = 0x0030;
+	brinfo_area->request.code = 0x003d; /* network-subchannel operation */
+	brinfo_area->m	   = schid.m;
+	brinfo_area->ssid  = schid.ssid;
+	brinfo_area->sch   = schid.sch_no;
+	brinfo_area->cssid = schid.cssid;
+	brinfo_area->oc    = 0; /* Store-network-bridging-information list */
+	brinfo_area->resume_token = resume_token;
+	brinfo_area->n	   = (cnc != 0);
+	if (chsc(brinfo_area))
+		return -EIO;
+	return chsc_error_from_response(brinfo_area->response.code);
+}
+EXPORT_SYMBOL_GPL(chsc_pnso_brinfo);
drivers/s390/cio/chsc.h +50 -1

63 lines not on this page · raw message

drivers/s390/cio/qdio_main.c +91 -0

97 lines not on this page · raw message

#5 lore raw

PATCH 3/3 qeth: bridgeport support - address notifications

In reply to [email protected]

From: Eugene Crosser <[email protected]>

Introduce functions to enable and disable bridgeport address notification feature, sysfs attributes for access to these functions from userspace, and udev events emitted when a host joins or exits a bridgeport-enabled HiperSocket channel.

---
 Documentation/s390/qeth.txt       |   29 ++++
 drivers/s390/net/qeth_core.h      |    5 
 drivers/s390/net/qeth_core_main.c |    3 
 drivers/s390/net/qeth_core_mpc.c  |    1 
 drivers/s390/net/qeth_core_mpc.h  |   38 ++++++
 drivers/s390/net/qeth_l2_main.c   |  230 ++++++++++++++++++++++++++++++++++++++
 drivers/s390/net/qeth_l2_sys.c    |   62 ++++++++++
 7 files changed, 368 insertions(+)
Documentation/s390/qeth.txt +29 -0
@@ -19,3 +19,32 @@ BRIDGEPORT=statechange -  indicates that
 ROLE={primary|secondary|none} - the role assigned to the port.
 
 STATE={active|standby|inactive} - the newly assumed state of the port.
+
+When run on HiperSockets Bridge Capable Port hardware with host address
+notifications enabled, a udev event with ACTION=CHANGE is emitted.
+It is emitted on behalf of the corresponding ccwgroup device when a host
+or a VLAN is registered or unregistered on the network served by the device.
+The event has the following attributes:
+
+BRIDGEDHOST={reset|register|deregister|abort} - host address
+  notifications are started afresh, a new host or VLAN is registered or
+  deregistered on the Bridge Port HiperSockets channel, or address
+  notifications are aborted.
+
+VLAN=numeric-vlan-id - VLAN ID on which the event occurred. Not included
+  if no VLAN is involved in the event.
+
+MAC=xx:xx:xx:xx:xx:xx - MAC address of the host that is being registered
+  or deregistered from the HiperSockets channel. Not reported if the
+  event reports the creation or destruction of a VLAN.
+
+NTOK_BUSID=x.y.zzzz - device bus ID (CSSID, SSID and device number).
+
+NTOK_IID=xx - device IID.
+
+NTOK_CHPID=xx - device CHPID.
+
+NTOK_CHID=xxxx - device channel ID.
+
+Note that the NTOK_* attributes refer to devices other than  the one
+connected to the system on which the OS is running.
drivers/s390/net/qeth_core.h +5 -0
@@ -169,9 +169,12 @@ enum qeth_sbp_states {
 	QETH_SBP_STATE_ACTIVE	= 2,
 };
 
+#define QETH_SBP_HOST_NOTIFICATION 1
+
 struct qeth_sbp_info {
 	__u32 supported_funcs;
 	enum qeth_sbp_roles role;
+	__u32 hostnotification:1;
 };
 
 static inline int qeth_is_ipa_supported(struct qeth_ipa_info *ipa,
@@ -950,6 +953,8 @@ void qeth_bridgeport_query_support(struc
 int qeth_bridgeport_query_ports(struct qeth_card *card,
 	enum qeth_sbp_roles *role, enum qeth_sbp_states *state);
 int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role);
+int qeth_bridgeport_an_set(struct qeth_card *card, int enable);
+void qeth_bridge_host_event(struct qeth_card *card, struct qeth_ipa_cmd *cmd);
 int qeth_get_priority_queue(struct qeth_card *, struct sk_buff *, int, int);
 int qeth_get_elements_no(struct qeth_card *, struct sk_buff *, int);
 int qeth_get_elements_for_frags(struct sk_buff *);
drivers/s390/net/qeth_core_main.c +3 -0
@@ -622,6 +622,9 @@ static struct qeth_ipa_cmd *qeth_check_i
 					return NULL;
 				} else
 					return cmd;
+			case IPA_CMD_ADDRESS_CHANGE_NOTIF:
+				qeth_bridge_host_event(card, cmd);
+				return NULL;
 			case IPA_CMD_MODCCID:
 				return cmd;
 			case IPA_CMD_REGISTER_LOCAL_ADDR:
drivers/s390/net/qeth_core_mpc.c +1 -0
@@ -254,6 +254,7 @@ static struct ipa_cmd_names qeth_ipa_cmd
 	{IPA_CMD_DESTROY_ADDR,	"destroy_addr"},
 	{IPA_CMD_REGISTER_LOCAL_ADDR,	"register_local_addr"},
 	{IPA_CMD_UNREGISTER_LOCAL_ADDR,	"unregister_local_addr"},
+	{IPA_CMD_ADDRESS_CHANGE_NOTIF, "address_change_notification"},
 	{IPA_CMD_UNKNOWN,	"unknown"},
 };
 
drivers/s390/net/qeth_core_mpc.h +38 -0
@@ -109,6 +109,7 @@ enum qeth_ipa_cmds {
 	IPA_CMD_DESTROY_ADDR		= 0xc4,
 	IPA_CMD_REGISTER_LOCAL_ADDR	= 0xd1,
 	IPA_CMD_UNREGISTER_LOCAL_ADDR	= 0xd2,
+	IPA_CMD_ADDRESS_CHANGE_NOTIF	= 0xd3,
 	IPA_CMD_UNKNOWN			= 0x00
 };
 
@@ -520,6 +521,11 @@ struct net_if_token {
 	__u16 chid;
 } __packed;
 
+struct mac_addr_lnid {
+	__u8 mac[6];
+	__u16 lnid;
+} __packed;
+
 struct qeth_ipacmd_sbp_hdr {
 	__u32 supported_sbp_cmds;
 	__u32 enabled_sbp_cmds;
@@ -583,6 +589,37 @@ struct qeth_ipacmd_setbridgeport {
 	} data;
 } __packed;
 
+/* ADDRESS_CHANGE_NOTIFICATION adapter-initiated "command" *******************/
+/* Bitmask for entry->change_code. Both bits may be raised.		     */
+enum qeth_ipa_addr_change_code {
+	IPA_ADDR_CHANGE_CODE_VLANID		= 0x01,
+	IPA_ADDR_CHANGE_CODE_MACADDR		= 0x02,
+	IPA_ADDR_CHANGE_CODE_REMOVAL		= 0x80,	/* else addition */
+};
+enum qeth_ipa_addr_change_retcode {
+	IPA_ADDR_CHANGE_RETCODE_OK		= 0x0000,
+	IPA_ADDR_CHANGE_RETCODE_LOSTEVENTS	= 0x0010,
+};
+enum qeth_ipa_addr_change_lostmask {
+	IPA_ADDR_CHANGE_MASK_OVERFLOW		= 0x01,
+	IPA_ADDR_CHANGE_MASK_STATECHANGE	= 0x02,
+};
+
+struct qeth_ipacmd_addr_change_entry {
+	struct net_if_token token;
+	struct mac_addr_lnid addr_lnid;
+	__u8 change_code;
+	__u8 reserved1;
+	__u16 reserved2;
+} __packed;
+
+struct qeth_ipacmd_addr_change {
+	__u8 lost_event_mask;
+	__u8 reserved;
+	__u16 num_entries;
+	struct qeth_ipacmd_addr_change_entry entry[];
+} __packed;
+
 /* Header for each IPA command */
 struct qeth_ipacmd_hdr {
 	__u8   command;
@@ -613,6 +650,7 @@ struct qeth_ipa_cmd {
 		struct qeth_set_routing			setrtg;
 		struct qeth_ipacmd_diagass		diagass;
 		struct qeth_ipacmd_setbridgeport	sbp;
+		struct qeth_ipacmd_addr_change		addrchange;
 	} data;
 } __attribute__ ((packed));
 
drivers/s390/net/qeth_l2_main.c +230 -0

248 lines not on this page · raw message

drivers/s390/net/qeth_l2_sys.c +62 -0

81 lines not on this page · raw message