s390/qeth: updates 2021-07-20
Subsystems (5)
cover s390/qeth: updates 2021-07-20
Hi Dave & Jakub,
please apply the following patch series for qeth to netdev's net-next tree.
This removes the deprecated support for OSN-mode devices, and does some follow-on cleanups.
Thanks,
Julian
Julian Wiedmann (3):
s390/qeth: remove OSN support
s390/qeth: clean up QETH_PROT_* naming
s390/qeth: clean up device_type management
arch/s390/include/asm/ccwgroup.h | 2 - drivers/s390/cio/ccwgroup.c | 22 ---- drivers/s390/net/Kconfig | 9 -- drivers/s390/net/qeth_core.h | 46 -------- drivers/s390/net/qeth_core_main.c | 154 +++++++------------------- drivers/s390/net/qeth_core_mpc.c | 3 - drivers/s390/net/qeth_core_mpc.h | 23 +--- drivers/s390/net/qeth_core_sys.c | 5 - drivers/s390/net/qeth_ethtool.c | 7 -- drivers/s390/net/qeth_l2_main.c | 172 +++--------------------------- drivers/s390/net/qeth_l3_main.c | 7 +- 11 files changed, 61 insertions(+), 389 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/3 s390/qeth: remove OSN support
Commit fb64de1bc36c ("s390/qeth: phase out OSN support") spelled out why the OSN support in qeth is in a bad shape, and put any remaining interested parties on notice to speak up before it gets ripped out.
It's 2021 now, so make true on that promise and remove all the OSN-specific parts from qeth. This also means that we no longer need to export various parts of the cmd & data path internals to the L2 driver.
--- arch/s390/include/asm/ccwgroup.h | 2 - drivers/s390/cio/ccwgroup.c | 22 ---- drivers/s390/net/Kconfig | 9 -- drivers/s390/net/qeth_core.h | 44 -------- drivers/s390/net/qeth_core_main.c | 150 +++++++-------------------- drivers/s390/net/qeth_core_mpc.c | 3 - drivers/s390/net/qeth_core_mpc.h | 17 +--- drivers/s390/net/qeth_core_sys.c | 5 - drivers/s390/net/qeth_ethtool.c | 7 -- drivers/s390/net/qeth_l2_main.c | 164 +++--------------------------- 10 files changed, 48 insertions(+), 375 deletions(-)
arch/s390/include/asm/ccwgroup.h +0 -2
@@ -53,8 +53,6 @@ extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver);extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver);int ccwgroup_create_dev (struct device *root,struct ccwgroup_driver *gdrv,int num_devices,const char *buf); -struct ccwgroup_device *get_ccwgroupdev_by_busid (struct ccwgroup_driver *gdrv, -char *bus_id);extern int ccwgroup_set_online (struct ccwgroup_device *gdev);extern int ccwgroup_set_offline (struct ccwgroup_device *gdev);
drivers/s390/cio/ccwgroup.c +0 -22
@@ -503,28 +503,6 @@ void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver) }EXPORT_SYMBOL (ccwgroup_driver_unregister); -/** -* get_ccwgroupdev_by_busid() - obtain device from a bus id -* @gdrv: driver the device is owned by -* @bus_id: bus id of the device to be searched -* -* This function searches all devices owned by @gdrv for a device with a bus -* id matching @bus_id. -* Returns: -* If a match is found, its reference count of the found device is increased -* and it is returned; else %NULL is returned. -*/ -struct ccwgroup_device *get_ccwgroupdev_by_busid (struct ccwgroup_driver *gdrv, -char *bus_id) -{ -struct device *dev; - - dev =driver_find_device_by_name (&gdrv->driver, bus_id); - -return dev ?to_ccwgroupdev (dev) :NULL ; -} -EXPORT_SYMBOL_GPL (get_ccwgroupdev_by_busid); -/** * ccwgroup_probe_ccwdev() - probe function for slave devices * @cdev: ccw device to be probed
drivers/s390/net/Kconfig +0 -9
@@ -88,15 +88,6 @@ config QETH_L3 To compile as a module choose M. The module name is qeth_l3. If unsure, choose Y. -config QETH_OSN - def_bool !HAVE_MARCH_Z14_FEATURES - prompt "qeth OSN device support" - depends on QETH - help - This enables the qeth driver to support devices in OSN mode. - This feature will be removed in 2021. - If unsure, choose N. - config QETH_OSX def_bool !HAVE_MARCH_Z15_FEATURES prompt "qeth OSX device support"
drivers/s390/net/qeth_core.h +0 -44
116 lines not on this page · raw message
drivers/s390/net/qeth_core_main.c +35 -115
358 lines not on this page · raw message
drivers/s390/net/qeth_core_mpc.c +0 -3
@@ -232,9 +232,6 @@ static const struct ipa_cmd_names qeth_ipa_cmd_names[] = { {IPA_CMD_DELVLAN, "delvlan"}, {IPA_CMD_VNICC, "vnic_characteristics"}, {IPA_CMD_SETBRIDGEPORT_OSA, "set_bridge_port(osa)"}, - {IPA_CMD_SETCCID, "setccid"}, - {IPA_CMD_DELCCID, "delccid"}, - {IPA_CMD_MODCCID, "modccid"}, {IPA_CMD_SETIP, "setip"}, {IPA_CMD_QIPASSIST, "qipassist"}, {IPA_CMD_SETASSPARMS, "setassparms"},
drivers/s390/net/qeth_core_mpc.h +1 -16
@@ -34,8 +34,6 @@ extern const unsigned char IPA_PDU_HEADER[];/*****************************************************************************/ #define IPA_CMD_INITIATOR_HOST 0x00#define IPA_CMD_INITIATOR_OSA 0x01 -#define IPA_CMD_INITIATOR_HOST_REPLY 0x80 -#define IPA_CMD_INITIATOR_OSA_REPLY 0x81#define IPA_CMD_PRIM_VERSION_NO 0x01struct qeth_ipa_caps {
@@ -66,7 +64,6 @@ static inline bool qeth_ipa_caps_enabled(struct qeth_ipa_caps *caps, u32 mask)enum qeth_card_types {QETH_CARD_TYPE_OSD =1 ,QETH_CARD_TYPE_IQD =5 , -QETH_CARD_TYPE_OSN =6 ,QETH_CARD_TYPE_OSM =3 ,QETH_CARD_TYPE_OSX =2 , };
@@ -75,12 +72,6 @@ enum qeth_card_types {#define IS_OSD (card) ((card)->info.type == QETH_CARD_TYPE_OSD)#define IS_OSM (card) ((card)->info.type == QETH_CARD_TYPE_OSM) -#ifdef CONFIG_QETH_OSN -#define IS_OSN (card) ((card)->info.type == QETH_CARD_TYPE_OSN) -#else -#define IS_OSN (card) false -#endif -#ifdef CONFIG_QETH_OSX #define IS_OSX (card) ((card)->info.type == QETH_CARD_TYPE_OSX)#else
@@ -95,7 +86,6 @@ enum qeth_link_types {QETH_LINK_TYPE_FAST_ETH =0x01 ,QETH_LINK_TYPE_HSTR =0x02 ,QETH_LINK_TYPE_GBIT_ETH =0x03 , -QETH_LINK_TYPE_OSN =0x04 ,QETH_LINK_TYPE_10GBIT_ETH =0x10 ,QETH_LINK_TYPE_25GBIT_ETH =0x12 , QETH_LINK_TYPE_LANE_ETH100 = 0x81,
@@ -126,9 +116,6 @@ enum qeth_ipa_cmds {IPA_CMD_DELVLAN =0x26 ,IPA_CMD_VNICC =0x2a ,IPA_CMD_SETBRIDGEPORT_OSA =0x2b , -IPA_CMD_SETCCID =0x41 , -IPA_CMD_DELCCID =0x42 , -IPA_CMD_MODCCID =0x43 ,IPA_CMD_SETIP =0xb1 ,IPA_CMD_QIPASSIST =0xb2 , IPA_CMD_SETASSPARMS = 0xb3,
@@ -879,8 +866,7 @@ extern const char *qeth_get_ipa_msg(enum qeth_ipa_return_codes rc);extern const char *qeth_get_ipa_cmd_name (enum qeth_ipa_cmds cmd);/* Helper functions */ -#define IS_IPA_REPLY (cmd) ((cmd->hdr.initiator == IPA_CMD_INITIATOR_HOST) || \ - (cmd->hdr.initiator == IPA_CMD_INITIATOR_OSA_REPLY)) +#define IS_IPA_REPLY (cmd) ((cmd)->hdr.initiator == IPA_CMD_INITIATOR_HOST)/*****************************************************************************/ /* END OF IP Assist related definitions */
@@ -922,7 +908,6 @@ extern const unsigned char ULP_ENABLE[];/* Layer 2 definitions */ #define QETH_PROT_LAYER2 0x08#define QETH_PROT_TCPIP 0x03 -#define QETH_PROT_OSN2 0x0a#define QETH_ULP_ENABLE_PROT_TYPE (buffer) (buffer + 0x50)#define QETH_IPA_CMD_PROT_TYPE (buffer) (buffer + 0x19)
drivers/s390/net/qeth_core_sys.c +0 -5
@@ -671,11 +671,6 @@ static const struct attribute_group qeth_dev_group = { .attrs = qeth_dev_attrs, }; -const struct attribute_group *qeth_osn_dev_groups[] = { - &qeth_dev_group, -NULL , -}; -const struct attribute_group *qeth_dev_groups[] = { &qeth_dev_group, &qeth_dev_extended_group,
drivers/s390/net/qeth_ethtool.c +0 -7
@@ -469,10 +469,3 @@ const struct ethtool_ops qeth_ethtool_ops = { .set_per_queue_coalesce = qeth_set_per_queue_coalesce, .get_link_ksettings = qeth_get_link_ksettings, }; - -const struct ethtool_ops qeth_osn_ethtool_ops = { - .get_strings = qeth_get_strings, - .get_ethtool_stats = qeth_get_ethtool_stats, - .get_sset_count = qeth_get_sset_count, - .get_drvinfo = qeth_get_drvinfo, -};
drivers/s390/net/qeth_l2_main.c +12 -152
215 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 2/3 s390/qeth: clean up QETH_PROT_* naming
In reply to Julian WiedmannThe QETH_PROT_* naming is shared among two unrelated areas - one is the MPC-level protocol identifiers, the other is the qeth_prot_version enum.
Rename the MPC definitions to use QETH_MPC_PROT_*.
--- drivers/s390/net/qeth_core_main.c | 2 +- drivers/s390/net/qeth_core_mpc.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/s390/net/qeth_core_main.c +1 -1
@@ -2422,7 +2422,7 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply,static u8 qeth_mpc_select_prot_type (struct qeth_card *card) { -return IS_LAYER2 (card) ?QETH_PROT_LAYER2 :QETH_PROT_TCPIP ; +return IS_LAYER2 (card) ?QETH_MPC_PROT_L2 :QETH_MPC_PROT_L3 ; }static int qeth_ulp_enable (struct qeth_card *card)
drivers/s390/net/qeth_core_mpc.h +3 -3
@@ -905,9 +905,9 @@ extern const unsigned char ULP_ENABLE[]; (PDU_ENCAPSULATION(buffer) + 0x17)#define QETH_ULP_ENABLE_RESP_LINK_TYPE (buffer) \ (PDU_ENCAPSULATION(buffer) + 0x2b) -/* Layer 2 definitions */ -#define QETH_PROT_LAYER2 0x08 -#define QETH_PROT_TCPIP 0x03 + +#define QETH_MPC_PROT_L2 0x08 +#define QETH_MPC_PROT_L3 0x03#define QETH_ULP_ENABLE_PROT_TYPE (buffer) (buffer + 0x50)#define QETH_IPA_CMD_PROT_TYPE (buffer) (buffer + 0x19)
Signature · 1 line
2.25.1
PATCH 3/3 s390/qeth: clean up device_type management
In reply to Julian Wiedmannqeth uses three device_type structs - a generic one, and one for each sub-driver (which is used for fixed-layer devices only). Instead of exporting these device_types back&forth between the driver's modules, make all the logic self-contained within the sub-drivers.
On disc->setup() they either install their own device_type, or add the sysfs attributes that are missing in the generic device_type. Later on disc->remove() these attributes are removed again from any device that has the generic device_type.
--- drivers/s390/net/qeth_core.h | 2 -- drivers/s390/net/qeth_core_main.c | 4 +--- drivers/s390/net/qeth_l2_main.c | 8 +++++--- drivers/s390/net/qeth_l3_main.c | 7 ++++--- 4 files changed, 10 insertions(+), 11 deletions(-)
drivers/s390/net/qeth_core.h +0 -2
@@ -767,7 +767,6 @@ enum qeth_threads { };struct qeth_discipline { -const struct device_type *devtype;int (*setup) (struct ccwgroup_device *);void (*remove) (struct ccwgroup_device *);int (*set_online)(struct qeth_card *card,bool carrier_ok);
@@ -1040,7 +1039,6 @@ extern const struct qeth_discipline qeth_l2_discipline;extern const struct qeth_discipline qeth_l3_discipline;extern const struct ethtool_ops qeth_ethtool_ops;extern const struct attribute_group *qeth_dev_groups[]; -extern const struct device_type qeth_generic_devtype;const char *qeth_get_cardname_short (struct qeth_card *);int qeth_resize_buffer_pool (struct qeth_card *card,unsigned int count);
drivers/s390/net/qeth_core_main.c +1 -3
@@ -6286,10 +6286,9 @@ void qeth_remove_discipline(struct qeth_card *card) card->discipline =NULL ; } -const struct device_type qeth_generic_devtype = { +static const struct device_type qeth_generic_devtype = { .name ="qeth_generic" , }; -EXPORT_SYMBOL_GPL (qeth_generic_devtype);#define DBF_NAME_LEN 20
@@ -6474,7 +6473,6 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)if (rc) goto err_setup_disc; - gdev->dev.type = card->discipline->devtype;break ; }
drivers/s390/net/qeth_l2_main.c +5 -3
@@ -2056,10 +2056,12 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev)qeth_l2_vnicc_set_defaults (card);mutex_init (&card->sbp_lock); -if (gdev->dev.type == &qeth_generic_devtype) { +if (gdev->dev.type) { rc =device_add_groups (&gdev->dev, qeth_l2_attr_groups);if (rc)return rc; + }else { + gdev->dev.type = &qeth_l2_devtype; }INIT_WORK (&card->rx_mode_work, qeth_l2_rx_mode_work);
@@ -2070,8 +2072,9 @@ static void qeth_l2_remove_device(struct ccwgroup_device *gdev) {struct qeth_card *card =dev_get_drvdata (&gdev->dev); -if (gdev->dev.type == &qeth_generic_devtype) +if (gdev->dev.type != &qeth_l2_devtype)device_remove_groups (&gdev->dev, qeth_l2_attr_groups); +qeth_set_allowed_threads (card,0 ,1 );wait_event (card->wait_q,qeth_threads_running (card,0xffffffff ) ==0 );
@@ -2191,7 +2194,6 @@ static int qeth_l2_control_event(struct qeth_card *card, }const struct qeth_discipline qeth_l2_discipline = { - .devtype = &qeth_l2_devtype, .setup = qeth_l2_probe_device, .remove = qeth_l2_remove_device, .set_online = qeth_l2_set_online,
drivers/s390/net/qeth_l3_main.c +4 -3
@@ -1939,12 +1939,14 @@ static int qeth_l3_probe_device(struct ccwgroup_device *gdev)if (!card->cmd_wq)return -ENOMEM ; -if (gdev->dev.type == &qeth_generic_devtype) { +if (gdev->dev.type) { rc =device_add_groups (&gdev->dev, qeth_l3_attr_groups);if (rc) {destroy_workqueue (card->cmd_wq);return rc; } + }else { + gdev->dev.type = &qeth_l3_devtype; }INIT_WORK (&card->rx_mode_work, qeth_l3_rx_mode_work);
@@ -1955,7 +1957,7 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev) {struct qeth_card *card =dev_get_drvdata (&cgdev->dev); -if (cgdev->dev.type == &qeth_generic_devtype) +if (cgdev->dev.type != &qeth_l3_devtype)device_remove_groups (&cgdev->dev, qeth_l3_attr_groups);qeth_set_allowed_threads (card,0 ,1 );
@@ -2064,7 +2066,6 @@ static int qeth_l3_control_event(struct qeth_card *card, }const struct qeth_discipline qeth_l3_discipline = { - .devtype = &qeth_l3_devtype, .setup = qeth_l3_probe_device, .remove = qeth_l3_remove_device, .set_online = qeth_l3_set_online,
Signature · 1 line
2.25.1
This series was applied to netdev/net-next.git (refs/heads/master):
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Tue, 20 Jul 2021 08:38:46 +0200 you wrote:
Hi Dave & Jakub,
please apply the following patch series for qeth to netdev's net-next tree.
This removes the deprecated support for OSN-mode devices, and does some follow-on cleanups.
[...]
Here is the summary with links:
- [net-next,1/3] s390/qeth: remove OSN support
https://git.kernel.org/netdev/net-next/c/a8c7629c622b - [net-next,2/3] s390/qeth: clean up QETH_PROT_* naming https://git.kernel.org/netdev/net-next/c/a37cfa28ebdc - [net-next,3/3] s390/qeth: clean up device_type management https://git.kernel.org/netdev/net-next/c/ae57ea7a19b7
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html